Ben Adams 10 anni fa
parent
commit
eee3194a36
2 ha cambiato i file con 14 aggiunte e 0 eliminazioni
  1. 7 0
      src/core/BufferAttribute.js
  2. 7 0
      src/core/InterleavedBufferAttribute.js

+ 7 - 0
src/core/BufferAttribute.js

@@ -17,6 +17,13 @@ THREE.BufferAttribute.prototype = {
 
 	get length () {
 
+		THREE.warn( 'THREE.BufferAttribute.length has been removed. Use THREE.BufferAttribute.count instead.' );
+		return this.count;
+
+	},
+
+	get count() {
+
 		return this.array.length / this.itemSize;
 
 	},

+ 7 - 0
src/core/InterleavedBufferAttribute.js

@@ -17,6 +17,13 @@ THREE.InterleavedBufferAttribute.prototype = {
 
 	get length() {
 
+		THREE.warn( 'THREE.InterleavedBufferAttribute.length has been removed. Use THREE.InterleavedBufferAttribute.count instead.' );
+		return this.count;
+
+	},
+
+	get count() {
+
 		return this.data.array.length / this.data.stride;
 
 	},