Skip to content

Commit c377b53

Browse files
authored
Merge pull request #7305 from MuktiMishra/main
textureData updated to fix flipping property for webgl
2 parents 0fd2839 + 75c0bfb commit c377b53

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/webgl/p5.Texture.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,10 @@ p5.Texture = class Texture {
126126
this.isSrcHTMLElement
127127
) {
128128
// if param is a video HTML element
129-
textureData = this.src.elt;
129+
if (this.src._ensureCanvas) {
130+
this.src._ensureCanvas();
131+
}
132+
textureData = this.src.canvas || this.src.elt;
130133
} else if (this.isImageData) {
131134
textureData = this.src;
132135
}

0 commit comments

Comments
 (0)