소스 검색

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 = [];