Skip to content

Commit 9cdea3b

Browse files
committed
fix(glsl): fix html image handling
1 parent 810b0bf commit 9cdea3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/glsl/builtin-texture.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class Texture2D {
6464
let { buffer } = this.bufferRef;
6565
if (!buffer) {
6666
const { source, w, h } = this;
67-
if (typeof Image !== 'undefined' && source.constructor === Image) {
67+
if (typeof HTMLImageElement !== 'undefined' && source.constructor === HTMLImageElement) {
6868
let cvs = document.createElement('canvas');
6969
cvs.width = w;
7070
cvs.height = h;

0 commit comments

Comments
 (0)