@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / Behaviour / UiInteractionEvent
Type Alias: UiInteractionEvent ​
ts
type UiInteractionEvent = {
targetEntityId: number;
actionId: string;
input: XrInputState | null;
value?: boolean | number;
};Defined in: Behaviour.ts:75
Payload for spatial-UI hooks.
targetEntityId is the WIDGET that was interacted with — hooks bubble up the parent chain, so a panel script receives its children's events and can switch on actionId (the widget's authored id, defaulting to its entity name). input is null when the event came from the mouse in a flat preview rather than an XR pointer.
Properties ​
| Property | Type | Description | Defined in |
|---|---|---|---|
targetEntityId | number | - | Behaviour.ts:76 |
actionId | string | - | Behaviour.ts:77 |
input | XrInputState | null | - | Behaviour.ts:78 |
value? | boolean | number | Toggle: the new boolean. Slider: the new number. Absent for presses. | Behaviour.ts:80 |

