@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / index / HandPoseTracker
Class: HandPoseTracker ​
Defined in: xr/handPose.ts:771
Turns a stream of per-frame confidences into clean start/end events.
Two mechanisms, both necessary:
- HYSTERESIS. A single threshold makes confidence hovering at the boundary emit start/end at frame rate. Entering high and exiting low kills that.
- HOLD TIME. Fingers pass through many shapes on the way to the intended one; without a hold requirement a fist fires "point" en route.
Tracking loss gets a grace period rather than ending immediately, because hands drop out for a frame or two constantly at the edge of the camera FOV.
Constructors ​
Constructor ​
ts
new HandPoseTracker(options?): HandPoseTracker;Defined in: xr/handPose.ts:781
Parameters ​
| Parameter | Type |
|---|---|
options? | HandPoseTrackerOptions |
Returns ​
HandPoseTracker
Methods ​
isActive() ​
ts
isActive(): boolean;Defined in: xr/handPose.ts:792
Returns ​
boolean
update() ​
ts
update(confidence, now): XrHandPoseEvent;Defined in: xr/handPose.ts:797
Feed this frame's confidence. Returns an event on a transition.
Parameters ​
| Parameter | Type |
|---|---|
confidence | number |
now | number |
Returns ​
miss() ​
ts
miss(now): XrHandPoseEvent;Defined in: xr/handPose.ts:823
Feed a frame where the hand isn't tracked at all.
Parameters ​
| Parameter | Type |
|---|---|
now | number |
Returns ​
reset() ​
ts
reset(): void;Defined in: xr/handPose.ts:835
Returns ​
void

