Explorar el Código

Geometry: Fixed fromBufferGeometry().

Mr.doob hace 11 años
padre
commit
60692cf4c2
Se han modificado 1 ficheros con 4 adiciones y 5 borrados
  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 = [];