瀏覽代碼

Protect Texture against the closure circular reference bug

Tristan VALCKE 8 年之前
父節點
當前提交
4a887c434c
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      src/textures/Texture.js

+ 2 - 3
src/textures/Texture.js

@@ -59,7 +59,7 @@ function Texture( image, mapping, wrapS, wrapT, magFilter, minFilter, format, ty
 Texture.DEFAULT_IMAGE = undefined;
 Texture.DEFAULT_IMAGE = undefined;
 Texture.DEFAULT_MAPPING = UVMapping;
 Texture.DEFAULT_MAPPING = UVMapping;
 
 
-Texture.prototype = {
+Object.assign( Texture.prototype, EventDispatcher.prototype, {
 
 
 	constructor: Texture,
 	constructor: Texture,
 
 
@@ -283,8 +283,7 @@ Texture.prototype = {
 
 
 	}
 	}
 
 
-};
+} );
 
 
-Object.assign( Texture.prototype, EventDispatcher.prototype );
 
 
 export { Texture };
 export { Texture };