瀏覽代碼

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;