This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// usage: | |
// `const mesh = generateTubeMesh();` | |
// or with optional params: | |
// `const mesh = generateTubeMesh(1, 1, 10);` | |
const generateTubeMesh = (radius = 1, height = 1, sides = 5) => { | |
const points = sides * height * 6; | |
const step = (Math.PI * 2) / sides; | |
let angle = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class Constraint { | |
constructor (opts) { | |
this.vertices = opts.vertices; | |
this.points = opts.points; | |
this.index = opts.index; | |
this.restingDistance = opts.restingDistance || this.vertices[0].distanceTo(this.vertices[1]); | |
this.stiffness = this.index == 0 ? .05 : .005; | |
this.masses = opts.masses || [.01, .01]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// npm install this for convenience | |
var getUserMedia = require('getusermedia'); | |
// usage: | |
// Webcam.initCamera({ | |
// fallbackVideo: '/assets/video_mobile.mp4', // optional | |
// videoElement: someDOMElement, // (optional, defaults to document.querySelector('video')), | |
// facingMode: "environment", // defaults to "environment", which is rear cam | |
// }); | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Pass, RenderPass } from 'postprocessing'; | |
const glslify = require('glslify'); | |
const path = require('path'); | |
export default class DifferencePass extends Pass { | |
constructor() { | |
super("DifferencePass"); | |
this.bufferTexture = new THREE.WebGLRenderTarget( window.innerWidth, window.innerHeight, { minFilter: THREE.LinearFilter, magFilter: THREE.NearestFilter}); | |
this.renderPassLastBuffer = new RenderPass(this.scene, this.camera); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Pass, RenderPass } from 'postprocessing'; | |
const glslify = require('glslify'); | |
const path = require('path'); | |
export default class FeedbackPass extends Pass { | |
constructor() { | |
super("FeedbackPass"); | |
this.time = 0; | |
this.lastUpdate = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json", | |
"basics": { | |
"name": "Neil Pullman", | |
"label": "Creative Technologist", | |
"image": "https://avatars.githubusercontent.com/u/452313", | |
"email": "[email protected]", | |
"phone": "757-763-0724", | |
"url": "http://www.descend.org", | |
"summary": "Building things with creative tech. Interested in interfaces, creative work, and building creative tools.", |
OlderNewer