Upped Processing.js to 1.3.6, plus fixes to examples for 1.3.6

This commit is contained in:
fjenett
2011-11-06 11:44:43 +00:00
parent 40a2e4f0cc
commit f8c43eb3a6
6 changed files with 5625 additions and 15197 deletions
@@ -6,6 +6,13 @@ window.onload = function () {
var sketch = Processing.instances[0];
if ( sketch == undefined )
return setTimeout(tryFindSketch, 200); // retry in 0.2 secs
// extending our HTMLVideoElement object to return a PImage
video['getFrame'] = function () {
var img = new sketch.PImage;
img.fromHTMLImageData(video);
return img;
};
(function( s, v ){
var tryAddVideo = function () {
@@ -19,6 +26,8 @@ window.onload = function () {
})( sketch, video );
}
// looping currently not working in chrome as our internal server does
// not support http byte ranges
addEvent(video,'ended',function(){
if ( 'loop' in this && this.loop ) {
this.currentTime = 0;