tQuery - WebCam as texture
this is an example for tquery
HTML
<!doctype html><script src="http://jeromeetienne.github.com/tquery/build/tquery-bundle-require.js"></script>
<script>
// trick to get CORS on github content
requirejs.config({ baseUrl : "http://www.corsproxy.com/jeromeetienne.github.com/tquery/plugins/requirejs/examples/" });
</script>
<body><div id='info'>
<a href='http://jeromeetienne.github.com/tquery/'>tQuery</a> - WebCam as a texture<br/>
</div></body>
JavaScript
require(['tquery.pproc', 'tquery.videos'], function(){
// init the world
var world = tQuery.createWorld().boilerplate().pageTitle('#info').start();
// add some post processing
world.addEffectComposer().sepia().film(0.5, 0.25, 648, false)
.vignette().finish();
// create a cube with a webcam texture
var texture = tQuery.createWebcamTexture();
tQuery.createCube().addTo(world)
.setBasicMaterial().map(texture).back();
});