Sfoglia il codice sorgente

OBJExporter: Remove // when no uvs or normals

Fernando Serrano 7 anni fa
parent
commit
55d7370f33
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      examples/js/exporters/OBJExporter.js

+ 2 - 2
examples/js/exporters/OBJExporter.js

@@ -124,7 +124,7 @@ THREE.OBJExporter.prototype = {
 
 							j = indices.getX( i + m ) + 1;
 
-							face[ m ] = ( indexVertex + j ) + '/' + ( uvs ? ( indexVertexUvs + j ) : '' ) + ( normals ? '/' + ( indexNormals + j ) : '' );
+							face[ m ] = ( indexVertex + j ) + ( normals || uvs ? '/' + ( uvs ? ( indexVertexUvs + j ) : '' ) + ( normals ? '/' + ( indexNormals + j ) : '' ) : '' );
 
 						}
 
@@ -141,7 +141,7 @@ THREE.OBJExporter.prototype = {
 
 							j = i + m + 1;
 
-							face[ m ] = ( indexVertex + j ) + '/' + ( uvs ? ( indexVertexUvs + j ) : '' ) + '/' + ( normals ? '/' + ( indexNormals + j ) : '' );
+							face[ m ] = ( indexVertex + j ) + ( normals || uvs ? '/' + ( uvs ? ( indexVertexUvs + j ) : '' ) + ( normals ? '/' + ( indexNormals + j ) : '' ) : '' );
 
 						}