浏览代码

Merge pull request #20912 from 1993heqiang/local_dev

More detailed error messages when using invalid object types.
Mr.doob 4 年之前
父节点
当前提交
bd3da04442
共有 3 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      examples/js/loaders/GLTFLoader.js
  2. 1 1
      examples/jsm/loaders/GLTFLoader.js
  3. 1 1
      src/core/Raycaster.js

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

@@ -460,7 +460,7 @@ THREE.GLTFLoader = ( function () {
 				break;
 
 			default:
-				throw new Error( 'THREE.GLTFLoader: Unexpected light type, "' + lightDef.type + '".' );
+				throw new Error( 'THREE.GLTFLoader: Unexpected light type: ' + lightDef.type );
 
 		}
 

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

@@ -525,7 +525,7 @@ var GLTFLoader = ( function () {
 				break;
 
 			default:
-				throw new Error( 'THREE.GLTFLoader: Unexpected light type, "' + lightDef.type + '".' );
+				throw new Error( 'THREE.GLTFLoader: Unexpected light type: ' + lightDef.type );
 
 		}
 

+ 1 - 1
src/core/Raycaster.js

@@ -86,7 +86,7 @@ Object.assign( Raycaster.prototype, {
 
 		} else {
 
-			console.error( 'THREE.Raycaster: Unsupported camera type.' );
+			console.error( 'THREE.Raycaster: Unsupported camera type: ' + camera.type );
 
 		}