Browse Source

Merge pull request #7603 from simonThiele/dev

copy function should return the result to work
Mr.doob 9 years ago
parent
commit
ec57528538
2 changed files with 3 additions and 1 deletions
  1. 2 0
      src/core/InterleavedBuffer.js
  2. 1 1
      src/core/InterleavedBufferAttribute.js

+ 2 - 0
src/core/InterleavedBuffer.js

@@ -52,6 +52,8 @@ THREE.InterleavedBuffer.prototype = {
 		this.stride = source.stride;
 		this.dynamic = source.dynamic;
 
+		return this;
+
 	},
 
 	copyAt: function ( index1, attribute, index2 ) {

+ 1 - 1
src/core/InterleavedBufferAttribute.js

@@ -26,7 +26,7 @@ THREE.InterleavedBufferAttribute.prototype = {
 
 	get count() {
 
-		return this.data.array.length / this.data.stride;
+		return this.data.count;
 
 	},