Explorar el Código

Merge pull request #19039 from kaisalmen/OBJLoader2Parser_debug_correction

Fix materialIndexLine debug printing in OBJLoader2Parser
Michael Herzog hace 5 años
padre
commit
e43db781a3
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  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 +