提交 9676b37a 编写于 作者: M Mr.doob

AMFLoader: Clean up.

上级 fd4c58dc
......@@ -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 ) );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册