浏览代码

Merge pull request #12868 from takahirox/FixTexture

Fix Texture
Mr.doob 7 年之前
父节点
当前提交
8a7da6210b
共有 1 个文件被更改,包括 10 次插入10 次删除
  1. 10 10
      src/textures/Texture.js

+ 10 - 10
src/textures/Texture.js

@@ -64,16 +64,6 @@ function Texture( image, mapping, wrapS, wrapT, magFilter, minFilter, format, ty
 Texture.DEFAULT_IMAGE = undefined;
 Texture.DEFAULT_MAPPING = UVMapping;
 
-Object.defineProperty( Texture.prototype, "needsUpdate", {
-
-	set: function ( value ) {
-
-		if ( value === true ) this.version ++;
-
-	}
-
-} );
-
 Texture.prototype = Object.assign( Object.create( EventDispatcher.prototype ), {
 
 	constructor: Texture,
@@ -319,5 +309,15 @@ Texture.prototype = Object.assign( Object.create( EventDispatcher.prototype ), {
 
 } );
 
+Object.defineProperty( Texture.prototype, "needsUpdate", {
+
+	set: function ( value ) {
+
+		if ( value === true ) this.version ++;
+
+	}
+
+} );
+
 
 export { Texture };