Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / index / HandSource

Interface: HandSource ​

Defined in: hands/tracker.ts:31

What a project gives the world to read hands. The project's template provides one and sets it with World.setHandTracker, and only in a project that has hand tracking on.

Methods ​

status() ​

ts
status(): HandTrackingStatus;

Defined in: hands/tracker.ts:32

Returns ​

HandTrackingStatus


error()? ​

ts
optional error(): string | null;

Defined in: hands/tracker.ts:34

Why it failed, for a person.

Returns ​

string | null


poll() ​

ts
poll(timeMs): readonly HandDetection[] | null;

Defined in: hands/tracker.ts:39

Called on every world update. Runs the detector if it's due, and returns its result when it did. Null when it didn't run.

Parameters ​

ParameterType
timeMsnumber

Returns ​

readonly HandDetection[] | null


stats()? ​

ts
optional stats(): Record<string, number | string>;

Defined in: hands/tracker.ts:41

How often the detector ran over the last second or so, for a person looking at cost.

Returns ​

Record<string, number | string>


dispose()? ​

ts
optional dispose(): void;

Defined in: hands/tracker.ts:42

Returns ​

void