@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / index / SelectionContext
Type Alias: SelectionContext
ts
type SelectionContext = {
camera: THREE.Camera;
scene: THREE.Scene;
domElement: HTMLElement;
};Defined in: systems/ScriptBehaviourSystem.ts:259
Optional context that enables raycast-based onSelect / onDeselect dispatch. When provided, pointer/touch taps on the canvas fire a raycast against the scene. If the hit object (or any ancestor) carries userData.entityId, every Behaviour instance for that entity receives onSelect(); the previously selected entity's instances receive onDeselect().
Properties
| Property | Type | Defined in |
|---|---|---|
camera | THREE.Camera | systems/ScriptBehaviourSystem.ts:260 |
scene | THREE.Scene | systems/ScriptBehaviourSystem.ts:261 |
domElement | HTMLElement | systems/ScriptBehaviourSystem.ts:262 |

