@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / index / HandTrackerRuntime
Interface: HandTrackerRuntime ​
Defined in: hands/tracker.ts:184
What World.setHandTracker takes: hands, and what the world needs to run them.
Extends ​
Methods ​
status() ​
status(): HandTrackingStatus;Defined in: hands/tracker.ts:161
"loading" until the detector is up, then "ready", or "failed" if it couldn't start.
Returns ​
Inherited from ​
error() ​
error(): string | null;Defined in: hands/tracker.ts:163
Why it failed, for a person.
Returns ​
string | null
Inherited from ​
list() ​
list(): readonly Hand[];Defined in: hands/tracker.ts:165
Every hand in view.
Returns ​
readonly Hand[]
Inherited from ​
get() ​
get(side): Hand | null;Defined in: hands/tracker.ts:167
That hand if it's in view, or else null.
Parameters ​
| Parameter | Type |
|---|---|
side | HandSide |
Returns ​
Hand | null
Inherited from ​
first() ​
first(): Hand | null;Defined in: hands/tracker.ts:169
The hand that's been in view longest, or null.
Returns ​
Hand | null
Inherited from ​
isPose() ​
isPose(pose, side?): boolean;Defined in: hands/tracker.ts:171
Whether a hand is holding a pose. With no side, either hand.
Parameters ​
| Parameter | Type |
|---|---|
pose | HandPoseName |
side? | HandSide |
Returns ​
boolean
Inherited from ​
didGesture() ​
didGesture(name, side?): boolean;Defined in: hands/tracker.ts:173
That gesture fired on this frame. For a script that would rather poll than listen.
Parameters ​
| Parameter | Type |
|---|---|
name | HandGestureName |
side? | HandSide |
Returns ​
boolean
Inherited from ​
on() ​
on(name, listener): Unsubscribe;Defined in: hands/tracker.ts:175
Calls listener each time a gesture fires, or any gesture with "*". Returns what takes it off.
Parameters ​
| Parameter | Type |
|---|---|
name | "*" | HandGestureName |
listener | (event) => void |
Returns ​
Inherited from ​
attach() ​
attach(entityId, options?): void;Defined in: hands/tracker.ts:177
Keeps an entity on a hand. Its Transform is written every frame until detach.
Parameters ​
| Parameter | Type |
|---|---|
entityId | number |
options? | HandAttachOptions |
Returns ​
void
Inherited from ​
detach() ​
detach(entityId): void;Defined in: hands/tracker.ts:178
Parameters ​
| Parameter | Type |
|---|---|
entityId | number |
Returns ​
void
Inherited from ​
stats() ​
stats(): Record<string, number | string>;Defined in: hands/tracker.ts:180
What the detector is costing, for a person looking at frame rate.
Returns ​
Record<string, number | string>
Inherited from ​
update() ​
update(deltaTime): void;Defined in: hands/tracker.ts:186
One world update.
Parameters ​
| Parameter | Type |
|---|---|
deltaTime | number |
Returns ​
void
dispose() ​
dispose(): void;Defined in: hands/tracker.ts:187
Returns ​
void

