浏览代码

Merge pull request #16021 from WestLangley/dev-cyclic_dependency

Box3: Avoid cyclic dependency on Sphere
Mr.doob 6 年之前
父节点
当前提交
1adceb2999
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      src/math/Box3.js

+ 2 - 3
src/math/Box3.js

@@ -1,5 +1,4 @@
 import { Vector3 } from './Vector3.js';
 import { Vector3 } from './Vector3.js';
-import { Sphere } from './Sphere.js';
 
 
 /**
 /**
  * @author bhouston / http://clara.io
  * @author bhouston / http://clara.io
@@ -523,8 +522,8 @@ Object.assign( Box3.prototype, {
 
 
 			if ( target === undefined ) {
 			if ( target === undefined ) {
 
 
-				console.warn( 'THREE.Box3: .getBoundingSphere() target is now required' );
-				target = new Sphere();
+				console.error( 'THREE.Box3: .getBoundingSphere() target is now required' );
+				//target = new Sphere(); // removed to avoid cyclic dependency
 
 
 			}
 			}