Skip to content

@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 ​

PropertyTypeDescriptionDefined in
idstring-xr/handPose.ts:512
namestring-xr/handPose.ts:513
fingersRecord<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.fingerExclude<XrFinger, "thumb">-xr/handPose.ts:517
pinch.targetnumber1 = touching.xr/handPose.ts:519
pinch.tolerancenumber-xr/handPose.ts:520
orientation?XrHandPoseOrientation-xr/handPose.ts:522
directionToleranceDegrees?numberHow 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