Skip to content

Commit a567a73

Browse files
author
lauren mccarthy
committed
fixing bug with loadpixels on video element
1 parent 3cfc1b0 commit a567a73

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

lib/addons/p5.dom.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -777,12 +777,10 @@ var p5DOM = (function(){
777777
this.canvas = document.createElement('canvas');
778778
this.canvas.width = this.width;
779779
this.canvas.height = this.height;
780-
this.canvas.getContext('2d').drawImage(this.elt, 0, 0);
781-
p5.prototype.loadPixels.call(this);
782-
} else {
783-
this.canvas.getContext('2d').drawImage(this.elt, 0, 0);
784-
p5.prototype.loadPixels.call(this);
780+
this.drawingContext = this.canvas.getContext('2d');
785781
}
782+
this.drawingContext.drawImage(this.elt, 0, 0);
783+
p5.prototype.loadPixels.call(this);
786784
}
787785
return this;
788786
}

lib/p5.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! p5.js v0.3.4 August 26, 2014 */
1+
/*! p5.js v0.3.4 August 27, 2014 */
22
var shim = function (require) {
33
window.requestDraw = function () {
44
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback, element) {

0 commit comments

Comments
 (0)