Browse Source

BufferGeometry: Fixed addAttribute backwards compatibility.

Mr.doob 10 years ago
parent
commit
fc2cb195a8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/core/BufferGeometry.js

+ 1 - 1
src/core/BufferGeometry.js

@@ -33,7 +33,7 @@ THREE.BufferGeometry.prototype = {
 
 
 			console.warn( 'THREE.BufferGeometry: .addAttribute() now expects ( name, attribute ).' );
 			console.warn( 'THREE.BufferGeometry: .addAttribute() now expects ( name, attribute ).' );
 
 
-			this.attributes[ name ] = { array: arguments[ 1 ], itemSize: arguments[ 2 ] };
+			this.addAttribute( name, new THREE.BufferAttribute( arguments[ 1 ], arguments[ 2 ] ) );
 
 
 			return;
 			return;