Sfoglia il codice sorgente

Fix materialIndexLine debug printing in OBJLoader2Parser

Kai Salmen 5 anni fa
parent
commit
ed7beaa1d1
1 ha cambiato i file con 6 aggiunte e 1 eliminazioni
  1. 6 1
      examples/jsm/loaders/obj2/OBJLoader2Parser.js

+ 6 - 1
examples/jsm/loaders/obj2/OBJLoader2Parser.js

@@ -1012,7 +1012,12 @@ OBJLoader2Parser.prototype = {
 
 			if ( this.logging.enabled && this.logging.debug ) {
 
-				let materialIndexLine = ( selectedMaterialIndex === undefined || selectedMaterialIndex === null ) ? '' : '\n\t\tmaterialIndex: ' + selectedMaterialIndex;
+				let materialIndexLine = '';
+				if ( selectedMaterialIndex ) {
+
+					materialIndexLine = '\n\t\tmaterialIndex: ' + selectedMaterialIndex;
+
+				}
 				let createdReport = '\tOutput Object no.: ' + this.outputObjectCount +
 					'\n\t\tgroupName: ' + meshOutputGroup.groupName +
 					'\n\t\tIndex: ' + meshOutputGroup.index +