Browse Source

Fix Texture accessors

Tristan VALCKE 9 years ago
parent
commit
9ee0f7dddb
1 changed files with 6 additions and 6 deletions
  1. 6 6
      src/textures/Texture.js

+ 6 - 6
src/textures/Texture.js

@@ -59,17 +59,17 @@ function Texture( image, mapping, wrapS, wrapT, magFilter, minFilter, format, ty
 Texture.DEFAULT_IMAGE = undefined;
 Texture.DEFAULT_MAPPING = UVMapping;
 
-Object.assign( Texture.prototype, EventDispatcher.prototype, {
+Object.defineProperty( Texture.prototype, "needsUpdate", {
 
-	constructor: Texture,
+	set: function(value) { if ( value === true ) this.version ++; }
 
-	isTexture: true,
+});
 
-	set needsUpdate( value ) {
+Object.assign( Texture.prototype, EventDispatcher.prototype, {
 
-		if ( value === true ) this.version ++;
+	constructor: Texture,
 
-	},
+	isTexture: true,
 
 	clone: function () {