Explorar el Código

Merge pull request #11946 from takahirox/UpdateTextureGetDataURL

Update how to check if argument is canvas in getDataURL() of Texture
Mr.doob hace 8 años
padre
commit
42ce0a7f3b
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/textures/Texture.js

+ 1 - 1
src/textures/Texture.js

@@ -125,7 +125,7 @@ Object.assign( Texture.prototype, EventDispatcher.prototype, {
 
 			var canvas;
 
-			if ( image.toDataURL !== undefined ) {
+			if ( image instanceof HTMLCanvasElement ) {
 
 				canvas = image;