Explorar o código

OBJLoader: Do not fail with unexpected lines.

Mr.doob %!s(int64=5) %!d(string=hai) anos
pai
achega
b487814404
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      examples/js/loaders/OBJLoader.js
  2. 1 1
      examples/jsm/loaders/OBJLoader.js

+ 1 - 1
examples/js/loaders/OBJLoader.js

@@ -622,7 +622,7 @@ THREE.OBJLoader = ( function () {
 					// Handle null terminated files without exception
 					if ( line === '\0' ) continue;
 
-					throw new Error( 'THREE.OBJLoader: Unexpected line: "' + line + '"' );
+					console.warn( 'THREE.OBJLoader: Unexpected line: "' + line + '"' );
 
 				}
 

+ 1 - 1
examples/jsm/loaders/OBJLoader.js

@@ -639,7 +639,7 @@ var OBJLoader = ( function () {
 					// Handle null terminated files without exception
 					if ( line === '\0' ) continue;
 
-					throw new Error( 'THREE.OBJLoader: Unexpected line: "' + line + '"' );
+					console.warn( 'THREE.OBJLoader: Unexpected line: "' + line + '"' );
 
 				}