Keep Rollin'

Installation
$ npm install keep-rollin
Usage
var Webcam = require("keep-rollin");
var webcam = new Webcam({
minWidth: 1920,
minHeight: 1080,
minFrameRate: 30,
});
var webcamTexture;
function renderLoop(){
if(webcam.video.readyState === webcam.video.HAVE_ENOUGH_DATA) {
if(webcamTexture) {
webcamTexture.setPixels(webcam.video);
} else {
webcamTexture = funcThatMakesATextureFromAStream(webcam.video);
}
this.shader.uniforms.uWebcamTexture = this.webcamTexture.bind();
}
window.requestAnimationFrame(renderLoop);
}
window.requestAnimationFrame(renderLoop);
Badges
