React Native API
import { useMimic, MimicCamera } from '@vidrip/mimic-react-native';useMimic(options)
Section titled “useMimic(options)”| Option | Type | Default | |
|---|---|---|---|
on |
{ [pattern]: handler } |
none | Gesture handlers. Changing the object between renders is fine. |
profile |
CalibrationProfile |
none | A stored profile; skips calibration |
onProfile |
(p) => void |
none | Called with each new profile, to persist it |
blendshapes |
boolean | false |
Run the expression network (needed for eyes.up, expression.match) |
gestures |
GestureId[] |
all supported | Arm only these |
spec |
MimicSpec | overrides |
phone set | Threshold set and overrides |
framing |
(centre) => boolean |
none | Calibration only counts frames where this returns true (face inside your guide) |
landmarks |
'never' | 'always' |
'never' |
Carry the full 478-point mesh on every sample |
pushVideoFrames |
boolean | false |
Also expose frames for a WebRTC publisher |
Returns a handle:
| Member | |
|---|---|
frameOutput |
Pass to <MimicCamera> (or your own VisionCamera outputs) |
on(pattern, handler), isActive(id) |
As on the web |
faceFound, centered, fps, aspect, isMirrored |
Live state, updated a few times a second |
latest |
The last frame’s measurements |
calibrate(), cancelCalibration(), calibration, calibrating, profile |
As on the web |
setExpressionTarget(scores) |
Target for expression.match |
setWantLandmarks(on) |
Switch the full mesh on and off at runtime |
engine |
The underlying MimicEngine |
MimicCamera
Section titled “MimicCamera”<MimicCamera mimic={face} position="front" isActive resizeMode="cover" style={…} />A VisionCamera <Camera> wired to the hook’s frame output. isActive turns the camera off without unmounting; position is 'front' (default) or 'back'.