瀏覽代碼

Geometry: Fixed fromBufferGeometry().

Mr.doob 11 年之前
父節點
當前提交
60692cf4c2
共有 1 個文件被更改,包括 4 次插入5 次删除
  1. 4 5
      src/core/Geometry.js

+ 4 - 5
src/core/Geometry.js

@@ -101,12 +101,11 @@ THREE.Geometry.prototype = {
 
 		var attributes = geometry.attributes;
 
-		var indices = attributes.index !== undefined && attributes.index.array;
-		var normals = attributes.normal !== undefined && attributes.normal.array;
-		var colors = attributes.color !== undefined && attributes.color.array;
-		var uvs = attributes.uv !== undefined && attributes.uv.array;
-
 		var vertices = attributes.position.array;
+		var indices = attributes.index !== undefined ? attributes.index.array : undefined;
+		var normals = attributes.normal !== undefined ? attributes.normal.array : undefined;
+		var colors = attributes.color !== undefined ? attributes.color.array : undefined;
+		var uvs = attributes.uv !== undefined ? attributes.uv.array : undefined;
 
 		var tempNormals = [];
 		var tempUVs = [];