diff --git a/src/renderers/WebGLRenderer.js b/src/renderers/WebGLRenderer.js index 8dbd98f6c9ec69680e4bce21628198f972fb7ce1..554cccdc49af65f3c4b2cf9f6c2ba2f9105c56cf 100644 --- a/src/renderers/WebGLRenderer.js +++ b/src/renderers/WebGLRenderer.js @@ -4844,7 +4844,7 @@ THREE.WebGLRenderer = function ( parameters ) { _gl.bindTexture( _gl.TEXTURE_2D, texture.__webglTexture ); - if ( texture.constructor == THREE.DataTexture) { + if ( texture instanceof THREE.DataTexture) { _gl.texImage2D( _gl.TEXTURE_2D, 0, paramThreeToGL( texture.format ), texture.image.width, texture.image.height, 0, paramThreeToGL( texture.format ), _gl.UNSIGNED_BYTE, texture.image.data );