浏览代码

OBJLoader: Do not fail with unexpected lines.

Mr.doob 5 年之前
父节点
当前提交
b487814404
共有 2 个文件被更改,包括 2 次插入2 次删除
  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
 					// Handle null terminated files without exception
 					if ( line === '\0' ) continue;
 					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
 					// Handle null terminated files without exception
 					if ( line === '\0' ) continue;
 					if ( line === '\0' ) continue;
 
 
-					throw new Error( 'THREE.OBJLoader: Unexpected line: "' + line + '"' );
+					console.warn( 'THREE.OBJLoader: Unexpected line: "' + line + '"' );
 
 
 				}
 				}