Skip to content

@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:105

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 ​

PropertyTypeDefined in
cameraTHREE.Camerasystems/ScriptBehaviourSystem.ts:106
sceneTHREE.Scenesystems/ScriptBehaviourSystem.ts:107
domElementHTMLElementsystems/ScriptBehaviourSystem.ts:108