@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / index / FaceTracker
Interface: FaceTracker ​
Defined in: face/tracker.ts:30
What a face-tracking runtime gives the world. The project's template provides one and sets it with World.setFaceTracker; there is none in the editor or in other kinds of project, so everything reading it has to cope with null.
Extended by ​
Methods ​
isTracking() ​
isTracking(): boolean;Defined in: face/tracker.ts:32
A face is in view right now.
Returns ​
boolean
getBlendshape() ​
getBlendshape(name): number;Defined in: face/tracker.ts:38
How strongly an expression is showing, 0 to 1. name is an ARKit-style blendshape: jawOpen, mouthSmileLeft, eyeBlinkRight, browInnerUp and so on. 0 when no face is in view.
Parameters ​
| Parameter | Type |
|---|---|
name | string |
Returns ​
number
getBlendshapes() ​
getBlendshapes(): Record<string, number>;Defined in: face/tracker.ts:40
Every expression showing now, by name.
Returns ​
Record<string, number>
getHeadFit() ​
getHeadFit(): FaceHeadFit;Defined in: face/tracker.ts:42
How the current person's head compares with the average one.
Returns ​
resolvePoint() ​
resolvePoint(point, options): [number, number, number] | null;Defined in: face/tracker.ts:47
Where a place on the head is on this person, in head units. live follows this frame's expression; otherwise it's where that place rests.
Parameters ​
| Parameter | Type |
|---|---|
point | FaceAttachPoint |
options | { live: boolean; } |
options.live | boolean |
Returns ​
[number, number, number] | null
getPose()? ​
optional getPose(): FacePose | null;Defined in: face/tracker.ts:53
Where the head is, once per frame of tracking. Optional: a runtime from before gestures doesn't give one, and then there are no positions or head gestures, and expressions are read on every world update.
Returns ​
FacePose | null

