Skip to content

Commit f22c603

Browse files
committed
Update OctreeRaycaster.js
1 parent 387fa43 commit f22c603

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/core/OctreeRaycaster.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ test("can find intersecting octants", t => {
1111

1212
const octree = new Octree(root);
1313
const raycaster = new Raycaster(
14-
new Vector3(0.5, -1, 0.5),
15-
new Vector3(1, 1, 1)
14+
new Vector3(0.5, 0.5, 2),
15+
new Vector3(0, 0, -1)
1616
);
1717

1818
octree.root.split();
1919

2020
const intersects = octree.getIntersectingNodes(raycaster);
2121

22-
t.is(intersects.length, 1, "should return one intersecting octant");
23-
t.is(intersects[0], octree.root.children[5], "should return the sixth child");
22+
t.is(intersects.length, 2, "should return two intersecting octant");
23+
t.is(intersects[0], octree.root.children[7], "should return octant #8");
2424

2525
});

0 commit comments

Comments
 (0)