Skip to main content

Class: FacesOptions

Defined in: src/world/faces/FacesOptions.ts:7

Configuration options for the Face Landmark Detection system.

Constructors

Constructor

new FacesOptions(options?): FacesOptions

Defined in: src/world/faces/FacesOptions.ts:54

Parameters

options?
backendConfig?

{ activeBackend?: string; mediapipe?: { minFaceDetectionConfidence?: number; minFacePresenceConfidence?: number; minTrackingConfidence?: number; modelAssetPath?: string; numFaces?: number; outputFaceBlendshapes?: boolean; outputFacialTransformationMatrixes?: boolean; wasmFilesUrl?: string; }; } = ...

Configuration options for the active face detection backend.

backendConfig.activeBackend?

string = 'mediapipe'

backendConfig.mediapipe?

{ minFaceDetectionConfidence?: number; minFacePresenceConfidence?: number; minTrackingConfidence?: number; modelAssetPath?: string; numFaces?: number; outputFaceBlendshapes?: boolean; outputFacialTransformationMatrixes?: boolean; wasmFilesUrl?: string; } = ...

backendConfig.mediapipe.minFaceDetectionConfidence?

number = 0.5

The minimum confidence score [0.0, 1.0] required for a face to be detected.

backendConfig.mediapipe.minFacePresenceConfidence?

number = 0.5

The minimum confidence score [0.0, 1.0] required to confirm a face is still present.

backendConfig.mediapipe.minTrackingConfidence?

number = 0.5

The minimum confidence score [0.0, 1.0] required for tracking landmarks between frames.

backendConfig.mediapipe.modelAssetPath?

string = 'https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/latest/face_landmarker.task'

backendConfig.mediapipe.numFaces?

number = 1

The maximum number of simultaneous faces to track.

backendConfig.mediapipe.outputFaceBlendshapes?

boolean = true

Whether to compute and emit per-face blendshape weights (52 ARKit-compatible categories). Required for facial expression mirroring, lipsync feeds, and avatar animation.

backendConfig.mediapipe.outputFacialTransformationMatrixes?

boolean = true

Whether to compute and emit the 4x4 facial transformation matrix for each face. Provides a stable rigid head pose for parenting objects to the head (glasses, masks, hats).

backendConfig.mediapipe.wasmFilesUrl?

string = 'https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@latest/wasm'

enable?

() => FacesOptions

enabled?

boolean = false

Returns

FacesOptions

Properties

backendConfig

backendConfig: object

Defined in: src/world/faces/FacesOptions.ts:13

Configuration options for the active face detection backend.

activeBackend

activeBackend: string = 'mediapipe'

mediapipe

mediapipe: object

mediapipe.minFaceDetectionConfidence

minFaceDetectionConfidence: number = 0.5

The minimum confidence score [0.0, 1.0] required for a face to be detected.

mediapipe.minFacePresenceConfidence

minFacePresenceConfidence: number = 0.5

The minimum confidence score [0.0, 1.0] required to confirm a face is still present.

mediapipe.minTrackingConfidence

minTrackingConfidence: number = 0.5

The minimum confidence score [0.0, 1.0] required for tracking landmarks between frames.

mediapipe.modelAssetPath

modelAssetPath: string = 'https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/latest/face_landmarker.task'

mediapipe.numFaces

numFaces: number = 1

The maximum number of simultaneous faces to track.

mediapipe.outputFaceBlendshapes

outputFaceBlendshapes: boolean = true

Whether to compute and emit per-face blendshape weights (52 ARKit-compatible categories). Required for facial expression mirroring, lipsync feeds, and avatar animation.

mediapipe.outputFacialTransformationMatrixes

outputFacialTransformationMatrixes: boolean = true

Whether to compute and emit the 4x4 facial transformation matrix for each face. Provides a stable rigid head pose for parenting objects to the head (glasses, masks, hats).

mediapipe.wasmFilesUrl

wasmFilesUrl: string = 'https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@latest/wasm'


enabled

enabled: boolean = false

Defined in: src/world/faces/FacesOptions.ts:8

Methods

enable()

enable(): FacesOptions

Defined in: src/world/faces/FacesOptions.ts:60

Returns

FacesOptions