Browse Source

Fix InterleavedBufferAttribute acessor assignement

Tristan VALCKE 8 years ago
parent
commit
9d3f359693
1 changed files with 7 additions and 11 deletions
  1. 7 11
      src/core/InterleavedBufferAttribute.js

+ 7 - 11
src/core/InterleavedBufferAttribute.js

@@ -16,23 +16,19 @@ function InterleavedBufferAttribute( interleavedBuffer, itemSize, offset, normal
 
 }
 
-Object.assign( InterleavedBufferAttribute.prototype, {
-
-	constructor: InterleavedBufferAttribute,
+Object.defineProperties( InterleavedBufferAttribute.prototype, {
 
-	isInterleavedBufferAttribute: true,
-
-	get count() {
+	"count" : { get: function () { return this.data.count; } },
 
-		return this.data.count;
+	"array" : { get: function () { return this.data.array; } }
 
-	},
+} );
 
-	get array() {
+Object.assign( InterleavedBufferAttribute.prototype, {
 
-		return this.data.array;
+	constructor: InterleavedBufferAttribute,
 
-	},
+	isInterleavedBufferAttribute: true,
 
 	setX: function ( index, x ) {