We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5810754 commit d677adcCopy full SHA for d677adc
src/webgl/p5.Texture.js
@@ -126,7 +126,12 @@ p5.Texture = class Texture {
126
this.isSrcHTMLElement
127
) {
128
// if param is a video HTML element
129
- textureData = this.src.elt;
+ // UPDATED:
130
+ if (this.src._ensureCanvas) {
131
+ this.src._ensureCanvas()
132
+ }
133
+ textureData = this.src.canvas || this.src.elt;
134
+ // End update
135
} else if (this.isImageData) {
136
textureData = this.src;
137
}
0 commit comments