Browse Source

Updated addAttribute('index'... to setIndex(... per a warning in r73dev

Elijah Snyder 9 years ago
parent
commit
c1dd693c41
1 changed files with 2 additions and 2 deletions
  1. 2 2
      examples/js/loaders/AMFLoader.js

+ 2 - 2
examples/js/loaders/AMFLoader.js

@@ -106,8 +106,8 @@ THREE.AMFLoader.prototype = {
 
 					var material = objdefaultmaterial;
 
-					newgeometry.addAttribute('position', vertices.clone());
-					newgeometry.addAttribute('index', new THREE.BufferAttribute(indexes, 1));
+					newgeometry.addAttribute('position', vertices.clone() );
+					newgeometry.setIndex( new THREE.BufferAttribute(indexes, 1) );
 
 					if(amfMaterials[currvolume.materialid] !== undefined) {
 						material = amfMaterials[currvolume.materialid];