2
0
Эх сурвалжийг харах

Fix InterleavedBufferAttribute acessor assignement

Tristan VALCKE 8 жил өмнө
parent
commit
9d3f359693

+ 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 ) {