Преглед на файлове

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

Takahiro преди 8 години
родител
ревизия
20ca12078f
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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;