@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / types / RaycastOptions
Type Alias: RaycastOptions ​
ts
type RaycastOptions = {
near?: number;
far?: number;
firstHitOnly?: boolean;
visibleOnly?: boolean;
entities?: readonly EntityId[];
objects?: readonly THREE.Object3D[];
ignore?: readonly EntityId[];
layers?: RaycastLayers | number;
};Defined in: types.ts:173
Properties ​
| Property | Type | Description | Defined in |
|---|---|---|---|
near? | number | Minimum hit distance (when passing options in place of near). | types.ts:175 |
far? | number | Maximum hit distance. | types.ts:177 |
firstHitOnly? | boolean | Only the nearest hit. Meshes are tried nearest first and the search stops once nothing left can be nearer: much cheaper in a big scene. | types.ts:182 |
visibleOnly? | boolean | Skip hidden objects and everything under them. | types.ts:184 |
entities? | readonly EntityId[] | Test only these entities (and their children). | types.ts:186 |
objects? | readonly THREE.Object3D[] | Test only these objects (and their children). | types.ts:188 |
ignore? | readonly EntityId[] | Never hit these entities or anything under them. | types.ts:190 |
layers? | RaycastLayers | number | Only objects on these three.js layers (a Layers, or one layer number). | types.ts:192 |

