浏览代码

Remove check for boxHelper

Garrett Johnson 5 年之前
父节点
当前提交
6e9cb8cc9a
共有 2 个文件被更改,包括 3 次插入7 次删除
  1. 1 1
      src/three/TilesGroup.js
  2. 2 6
      src/three/raycastTraverse.js

+ 1 - 1
src/three/TilesGroup.js

@@ -41,7 +41,7 @@ export class TilesGroup extends Group {
 
 			this.matrixWorldNeedsUpdate = false;
 
-
+			// check if the matrix changed relative to what it was.
 			const elA = tempMat.elements;
 			const elB = this.matrixWorld.elements;
 			let isDifferent = false;

+ 2 - 6
src/three/raycastTraverse.js

@@ -18,12 +18,8 @@ function intersectTileScene( scene, raycaster, intersects ) {
 	// Don't intersect the box3 helpers because those are used for debugging
 	scene.traverse( c => {
 
-		if ( ! ( c instanceof Box3Helper ) ) {
-
-			// We set the default raycast function to empty so three.js doesn't automatically cast against it
-			Object.getPrototypeOf( c ).raycast.call( c, raycaster, intersects );
-
-		}
+		// We set the default raycast function to empty so three.js doesn't automatically cast against it
+		Object.getPrototypeOf( c ).raycast.call( c, raycaster, intersects );
 
 	} );