浏览代码

Fixed UTF8Loader.

Mr.doob 11 年之前
父节点
当前提交
73bdf4048d
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      examples/js/loaders/UTF8Loader.js

+ 4 - 4
examples/js/loaders/UTF8Loader.js

@@ -94,10 +94,10 @@ THREE.UTF8Loader.BufferGeometryCreator.prototype.create = function ( attribArray
 
 
 	}
 	}
 
 
-    geometry.addAttribute( 'index', new THREE.Uint32Attribute( indices, 1 ) );
-    geometry.addAttribute( 'position', new THREE.Float32Attribute( positions, 3 ) );
-    geometry.addAttribute( 'normal', new THREE.Float32Attribute( normals, 3 ) );
-    geometry.addAttribute( 'uv', new THREE.Float32Attribute( uvs, 2 ) );
+    geometry.addAttribute( 'index', new THREE.BufferAttribute( indices, 1 ) );
+    geometry.addAttribute( 'position', new THREE.BufferAttribute( positions, 3 ) );
+    geometry.addAttribute( 'normal', new THREE.BufferAttribute( normals, 3 ) );
+    geometry.addAttribute( 'uv', new THREE.BufferAttribute( uvs, 2 ) );
 
 
     geometry.offsets.push( { start: 0, count: indices.length, index: 0 } );
     geometry.offsets.push( { start: 0, count: indices.length, index: 0 } );