Переглянути джерело

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 };