Explorar o código

Replace checking if image has to DataURL with checking if image is instanceof HTMLCanvasElement in getDataURL() of Texture

Takahiro %!s(int64=8) %!d(string=hai) anos
pai
achega
20ca12078f
Modificáronse 1 ficheiros con 1 adicións e 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;