0.1.0 • Published 7 years ago

keep-rollin v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

Keep Rollin'

Keep Rollin'

Installation

$ npm install keep-rollin

Usage

var Webcam = require("keep-rollin");

var webcam = new Webcam({
	minWidth: 1920, // default: 1280
	minHeight: 1080, // default: 720
	minFrameRate: 30, // default: 60
});

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();
	}
	/*

		...doing neat things

	*/
	window.requestAnimationFrame(renderLoop);
}
window.requestAnimationFrame(renderLoop);

Badges

npm.io npm.io

0.1.0

7 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago