Sfoglia il codice sorgente

BufferGeometry: Fixed addAttribute backwards compatibility.

Mr.doob 10 anni fa
parent
commit
fc2cb195a8
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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 ).' );
 
-			this.attributes[ name ] = { array: arguments[ 1 ], itemSize: arguments[ 2 ] };
+			this.addAttribute( name, new THREE.BufferAttribute( arguments[ 1 ], arguments[ 2 ] ) );
 
 			return;