2
0
Mr.doob 9 жил өмнө
parent
commit
9676b37a14

+ 3 - 6
examples/js/loaders/AMFLoader.js

@@ -433,15 +433,12 @@ THREE.AMFLoader.prototype = {
 
 				var objDefaultMaterial = defaultMaterial;
 				var mesh = meshes[ i ];
-				var meshVertices = Float32Array.from( mesh.vertices );
-				var vertices = new THREE.BufferAttribute( Float32Array.from( meshVertices ), 3 );
-				var meshNormals = null;
+				var vertices = new THREE.BufferAttribute( new Float32Array( mesh.vertices ), 3 );
 				var normals = null;
 
 				if ( mesh.normals.length ) {
 
-					meshNormals = Float32Array.from( mesh.normals );
-					normals = new THREE.BufferAttribute( Float32Array.from( meshNormals ), 3 );
+					normals = new THREE.BufferAttribute( new Float32Array( mesh.normals ), 3 );
 
 				}
 
@@ -467,7 +464,7 @@ THREE.AMFLoader.prototype = {
 
 					var volume = volumes[ j ];
 					var newGeometry = new THREE.BufferGeometry();
-					var indexes = Uint32Array.from( volume.triangles );
+					var indexes = new  Uint32Array( volume.triangles );
 					var material = objDefaultMaterial;
 
 					newGeometry.setIndex( new THREE.BufferAttribute( indexes, 1 ) );