@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / components / XrHandPoseEntry
Type Alias: XrHandPoseEntry ​
ts
type XrHandPoseEntry = {
id: string;
name: string;
preset: string | null;
curls: Record<XrFinger, number>;
tolerance: number;
directions: Record<XrFinger, XrHandPoseDirection[]>;
directionTolerance: number;
hand: "left" | "right" | null;
orientation: | XrHandPoseOrientation
| null;
minHoldSeconds: number;
enabled: boolean;
};Defined in: components/XRHandPose.ts:18
One pose an entity listens for.
A pose is either a named PRESET or a CUSTOM set of finger curls. Storing the preset id rather than a copy of its numbers means a preset improved in a later release reaches existing scenes, while custom poses stay pinned to exactly what the author dialled in.
Properties ​
| Property | Type | Description | Defined in |
|---|---|---|---|
id | string | Stable id, unique within the component. Used in Behaviour hooks. | components/XRHandPose.ts:20 |
name | string | Shown in the inspector and passed to scripts. | components/XRHandPose.ts:22 |
preset | string | null | Preset id, or null for a custom pose. | components/XRHandPose.ts:24 |
curls | Record<XrFinger, number> | Per-finger curl targets, 0 extended → 1 curled. Custom poses only. | components/XRHandPose.ts:26 |
tolerance | number | Slack around each curl target. Larger is easier to perform. | components/XRHandPose.ts:28 |
directions | Record<XrFinger, XrHandPoseDirection[]> | Directions each finger may point. Empty means the finger may point anywhere. Any ONE listed direction satisfies the finger, mirroring fingerpose's addDirection — "thumb up OR diagonally up" is one pose, not two. | components/XRHandPose.ts:35 |
directionTolerance | number | How far a finger may point from an accepted direction, in degrees. | components/XRHandPose.ts:37 |
hand | "left" | "right" | null | Which hand may trigger it; null for either. | components/XRHandPose.ts:39 |
orientation | | XrHandPoseOrientation | null | Optional direction requirement. | components/XRHandPose.ts:41 |
minHoldSeconds | number | Seconds the pose must be held before it fires. | components/XRHandPose.ts:43 |
enabled | boolean | - | components/XRHandPose.ts:44 |

