@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / index / XrHandPoseDefinition
Type Alias: XrHandPoseDefinition ​
ts
type XrHandPoseDefinition = {
id: string;
name: string;
fingers: Record<XrFinger, XrFingerTarget>;
pinch?: {
finger: Exclude<XrFinger, "thumb">;
target: number;
tolerance: number;
};
orientation?: XrHandPoseOrientation;
directionToleranceDegrees?: number;
hand?: "left" | "right";
};Defined in: xr/handPose.ts:511
A matchable hand pose.
Shape (finger curls) is kept separate from orientation deliberately: thumbs-up and thumbs-down are the SAME hand shape and differ only in where the thumb points. Folding orientation into the curl targets would force two nearly duplicate definitions and make neither editable in isolation.
Properties ​
| Property | Type | Description | Defined in |
|---|---|---|---|
id | string | - | xr/handPose.ts:512 |
name | string | - | xr/handPose.ts:513 |
fingers | Record<XrFinger, XrFingerTarget> | - | xr/handPose.ts:514 |
pinch? | { finger: Exclude<XrFinger, "thumb">; target: number; tolerance: number; } | Optional thumb-to-finger contact requirement. | xr/handPose.ts:516 |
pinch.finger | Exclude<XrFinger, "thumb"> | - | xr/handPose.ts:517 |
pinch.target | number | 1 = touching. | xr/handPose.ts:519 |
pinch.tolerance | number | - | xr/handPose.ts:520 |
orientation? | XrHandPoseOrientation | - | xr/handPose.ts:522 |
directionToleranceDegrees? | number | How far a finger may point from an accepted direction, in degrees. Generous by default: finger direction is a coarse signal, and a tight cone makes a pose that reads correctly to the user fail to register. | xr/handPose.ts:529 |
hand? | "left" | "right" | Restrict to one hand; omit to match either. | xr/handPose.ts:531 |

