Explorar el Código

Don't confuse DataTexture with a Texture with ImageData.

Fixes https://github.com/mrdoob/three.js/issues/453
Andrew Wason hace 14 años
padre
commit
9b0536da91
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/renderers/WebGLRenderer.js

+ 1 - 1
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 );