@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / index / intersectScene
Function: intersectScene() ​
ts
function intersectScene(
raycaster,
roots,
query?): Intersection<Object3D<Object3DEventMap>>[];Defined in: utils/raycast.ts:193
Intersect roots (recursively). With firstHitOnly, meshes are visited nearest bounding sphere first and the search stops once the next sphere starts beyond the best hit, so a ray through a city tests the few buildings in front instead of all of them.
Parameters ​
| Parameter | Type |
|---|---|
raycaster | Raycaster |
roots | readonly Object3D<Object3DEventMap>[] |
query | RaycastQuery |
Returns ​
Intersection<Object3D<Object3DEventMap>>[]

