@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / index / RaycastQuery
Type Alias: RaycastQuery ​
ts
type RaycastQuery = {
firstHitOnly?: boolean;
visibleOnly?: boolean;
objects?: readonly THREE.Object3D[];
ignore?: ReadonlySet<THREE.Object3D> | readonly THREE.Object3D[];
layers?: RaycastLayers | number;
};Defined in: utils/raycast.ts:169
What intersectScene and World.raycast accept.
Properties ​
| Property | Type | Description | Defined in |
|---|---|---|---|
firstHitOnly? | boolean | Only the nearest hit. Much cheaper in a big scene. | utils/raycast.ts:171 |
visibleOnly? | boolean | Skip hidden objects and everything under them. | utils/raycast.ts:173 |
objects? | readonly THREE.Object3D[] | Test only these objects (and their children) instead of the scene. | utils/raycast.ts:175 |
ignore? | ReadonlySet<THREE.Object3D> | readonly THREE.Object3D[] | Never hit these objects or anything under them. | utils/raycast.ts:177 |
layers? | RaycastLayers | number | Only objects on one of these layers (three's Layers, or a layer number). | utils/raycast.ts:179 |

