Skip to main content

Class: WorldOptions

Defined in: src/world/WorldOptions.ts:12

Constructors

Constructor

new WorldOptions(options?): WorldOptions

Defined in: src/world/WorldOptions.ts:24

Parameters

options?
debugging?

boolean = false

enabled?

boolean = false

enableFaceDetection?

() => WorldOptions

enableHumanDetection?

() => WorldOptions

enableMeshDetection?

() => WorldOptions

enableObjectDetection?

() => WorldOptions

enablePlaneDetection?

() => WorldOptions

enableSegmentation?

() => WorldOptions

enableSoundDetection?

() => WorldOptions

faces?

{ backendConfig?: { activeBackend?: string; mediapipe?: { minFaceDetectionConfidence?: number; minFacePresenceConfidence?: number; minTrackingConfidence?: number; modelAssetPath?: string; numFaces?: number; outputFaceBlendshapes?: boolean; outputFacialTransformationMatrixes?: boolean; wasmFilesUrl?: string; }; }; enable?: () => FacesOptions; enabled?: boolean; pollingIntervalMs?: number; } = ...

faces.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.

faces.backendConfig.activeBackend?

string = 'mediapipe'

faces.backendConfig.mediapipe?

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

faces.backendConfig.mediapipe.minFaceDetectionConfidence?

number = 0.5

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

faces.backendConfig.mediapipe.minFacePresenceConfidence?

number = 0.5

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

faces.backendConfig.mediapipe.minTrackingConfidence?

number = 0.5

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

faces.backendConfig.mediapipe.modelAssetPath?

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

faces.backendConfig.mediapipe.numFaces?

number = 1

The maximum number of simultaneous faces to track.

faces.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.

faces.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).

faces.backendConfig.mediapipe.wasmFilesUrl?

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

faces.enable?

() => FacesOptions

faces.enabled?

boolean = false

faces.pollingIntervalMs?

number = 0

Minimum delay in milliseconds between continuous face detection runs. A value of 0 runs again as soon as the previous detection finishes.

humans?

{ backendConfig?: { activeBackend?: string; mediapipe?: { minPoseDetectionConfidence?: number; minPosePresenceConfidence?: number; minTrackingConfidence?: number; modelAssetPath?: string; numPoses?: number; wasmFilesUrl?: string; }; }; enable?: () => HumansOptions; enabled?: boolean; pollingIntervalMs?: number; } = ...

humans.backendConfig?

{ activeBackend?: string; mediapipe?: { minPoseDetectionConfidence?: number; minPosePresenceConfidence?: number; minTrackingConfidence?: number; modelAssetPath?: string; numPoses?: number; wasmFilesUrl?: string; }; } = ...

Configuration options for the active pose detection backend.

humans.backendConfig.activeBackend?

string = 'mediapipe'

humans.backendConfig.mediapipe?

{ minPoseDetectionConfidence?: number; minPosePresenceConfidence?: number; minTrackingConfidence?: number; modelAssetPath?: string; numPoses?: number; wasmFilesUrl?: string; } = ...

humans.backendConfig.mediapipe.minPoseDetectionConfidence?

number = 0.5

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

humans.backendConfig.mediapipe.minPosePresenceConfidence?

number = 0.5

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

humans.backendConfig.mediapipe.minTrackingConfidence?

number = 0.5

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

humans.backendConfig.mediapipe.modelAssetPath?

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

humans.backendConfig.mediapipe.numPoses?

number = 1

The maximum number of simultaneous human poses/bodies to track.

humans.backendConfig.mediapipe.wasmFilesUrl?

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

humans.enable?

() => HumansOptions

humans.enabled?

boolean = false

humans.pollingIntervalMs?

number = 0

Minimum delay in milliseconds between continuous pose detection runs. A value of 0 runs again as soon as the previous detection finishes.

initiateRoomCapture?

boolean = false

meshes?

{ enable?: () => MeshDetectionOptions; enabled?: boolean; showDebugVisualizations?: boolean; } = ...

meshes.enable?

() => MeshDetectionOptions

meshes.enabled?

boolean = false

meshes.showDebugVisualizations?

boolean = false

objects?

{ backendConfig?: { activeBackend?: "gemini" | "mediapipe"; gemini?: { generationConfig?: {[key: string]: unknown; }; responseSchema?: { items?: ... | ...; type?: ... | ...; }; systemInstruction?: string; }; mediapipe?: { modelAssetPath?: string; scoreThreshold?: number; wasmFilesUrl?: string; }; }; debugging?: boolean; enable?: () => ObjectsOptions; enabled?: boolean; objectImageMargin?: number; pollingIntervalMs?: number; showDebugVisualizations?: boolean; } = ...

objects.backendConfig?

{ activeBackend?: "gemini" | "mediapipe"; gemini?: { generationConfig?: {[key: string]: unknown; }; responseSchema?: { items?: ... | ...; type?: ... | ...; }; systemInstruction?: string; }; mediapipe?: { modelAssetPath?: string; scoreThreshold?: number; wasmFilesUrl?: string; }; } = ...

Configuration for the detection backends.

objects.backendConfig.activeBackend?

"gemini" | "mediapipe" = ...

The active backend to use for detection.

objects.backendConfig.gemini?

{ generationConfig?: {[key: string]: unknown; }; responseSchema?: { items?: ... | ...; type?: ... | ...; }; systemInstruction?: string; } = ...

objects.backendConfig.gemini.generationConfig?

{[key: string]: unknown; } = ...

Extra Gemini generation config merged into the per-call config (over the SDK defaults). Use to pin sampling parameters such as temperature: 0 for deterministic detections.

objects.backendConfig.gemini.responseSchema?

{ items?: ... | ...; type?: ... | ...; } = ...

objects.backendConfig.gemini.responseSchema.items?

... | ... = ...

objects.backendConfig.gemini.responseSchema.type?

... | ... = 'ARRAY'

objects.backendConfig.gemini.systemInstruction?

string = ...

objects.backendConfig.mediapipe?

{ modelAssetPath?: string; scoreThreshold?: number; wasmFilesUrl?: string; } = ...

Configuration for MediaPipe backend.

objects.backendConfig.mediapipe.modelAssetPath?

string = 'https://storage.googleapis.com/mediapipe-models/object_detector/efficientdet_lite2/int8/latest/efficientdet_lite2.tflite'

objects.backendConfig.mediapipe.scoreThreshold?

number = 0.5

objects.backendConfig.mediapipe.wasmFilesUrl?

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

objects.debugging?

boolean = false

objects.enable?

() => ObjectsOptions

objects.enabled?

boolean = false

objects.objectImageMargin?

number = 0.05

Margin to add when cropping the object image, as a percentage of image size.

objects.pollingIntervalMs?

number = 0

Minimum delay in milliseconds between continuous object detection runs. A value of 0 runs again as soon as the previous detection finishes.

objects.showDebugVisualizations?

boolean = false

planes?

{ debugging?: boolean; enable?: () => PlanesOptions; enabled?: boolean; showDebugVisualizations?: boolean; } = ...

planes.debugging?

boolean = false

planes.enable?

() => PlanesOptions

planes.enabled?

boolean = false

planes.showDebugVisualizations?

boolean = false

segmentation?

{ backendConfig?: { activeBackend?: string; mediapipe?: { modelAssetPath?: string; outputCategoryMask?: boolean; wasmFilesUrl?: string; }; }; enable?: () => SegmentationOptions; enabled?: boolean; pollingIntervalMs?: number; } = ...

segmentation.backendConfig?

{ activeBackend?: string; mediapipe?: { modelAssetPath?: string; outputCategoryMask?: boolean; wasmFilesUrl?: string; }; } = ...

Configuration options for the active segmentation backend.

segmentation.backendConfig.activeBackend?

string = 'mediapipe'

segmentation.backendConfig.mediapipe?

{ modelAssetPath?: string; outputCategoryMask?: boolean; wasmFilesUrl?: string; } = ...

segmentation.backendConfig.mediapipe.modelAssetPath?

string = ...

segmentation.backendConfig.mediapipe.outputCategoryMask?

boolean = true

Output the per-pixel category mask. Required to produce a SegmentationMask.

segmentation.backendConfig.mediapipe.wasmFilesUrl?

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

segmentation.enable?

() => SegmentationOptions

segmentation.enabled?

boolean = false

segmentation.pollingIntervalMs?

number = 66

Minimum delay in milliseconds between continuous segmentation runs. A value of 0 runs again as soon as the previous inference finishes. Defaults to 66 (~15 fps), the rate the magic_window grab loop used before segmentation moved onto its own polling loop.

sounds?

{ backendConfig?: { activeBackend?: string; mediapipe?: { chunkSamples?: number; modelAssetPath?: string; wasmFilesUrl?: string; }; }; enable?: () => SoundsOptions; enabled?: boolean; showDebugInfo?: boolean; } = ...

sounds.backendConfig?

{ activeBackend?: string; mediapipe?: { chunkSamples?: number; modelAssetPath?: string; wasmFilesUrl?: string; }; } = ...

sounds.backendConfig.activeBackend?

string = 'mediapipe'

sounds.backendConfig.mediapipe?

{ chunkSamples?: number; modelAssetPath?: string; wasmFilesUrl?: string; } = ...

sounds.backendConfig.mediapipe.chunkSamples?

number = 16000

sounds.backendConfig.mediapipe.modelAssetPath?

string = 'https://tfhub.dev/google/lite-model/yamnet/classification/tflite/1?lite-format=tflite'

sounds.backendConfig.mediapipe.wasmFilesUrl?

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

sounds.enable?

() => SoundsOptions

sounds.enabled?

boolean = false

sounds.showDebugInfo?

boolean = false

Returns

WorldOptions

Properties

debugging

debugging: boolean = false

Defined in: src/world/WorldOptions.ts:13


enabled

enabled: boolean = false

Defined in: src/world/WorldOptions.ts:14


faces

faces: FacesOptions

Defined in: src/world/WorldOptions.ts:21


humans

humans: HumansOptions

Defined in: src/world/WorldOptions.ts:20


initiateRoomCapture

initiateRoomCapture: boolean = false

Defined in: src/world/WorldOptions.ts:15


meshes

meshes: MeshDetectionOptions

Defined in: src/world/WorldOptions.ts:18


objects

objects: ObjectsOptions

Defined in: src/world/WorldOptions.ts:17


planes

planes: PlanesOptions

Defined in: src/world/WorldOptions.ts:16


segmentation

segmentation: SegmentationOptions

Defined in: src/world/WorldOptions.ts:22


sounds

sounds: SoundsOptions

Defined in: src/world/WorldOptions.ts:19

Methods

enableFaceDetection()

enableFaceDetection(): WorldOptions

Defined in: src/world/WorldOptions.ts:78

Enables face landmark detection.

Returns

WorldOptions


enableHumanDetection()

enableHumanDetection(): WorldOptions

Defined in: src/world/WorldOptions.ts:69

Enables human detection.

Returns

WorldOptions


enableMeshDetection()

enableMeshDetection(): WorldOptions

Defined in: src/world/WorldOptions.ts:51

Enables mesh detection.

Returns

WorldOptions


enableObjectDetection()

enableObjectDetection(): WorldOptions

Defined in: src/world/WorldOptions.ts:42

Enables object detection.

Returns

WorldOptions


enablePlaneDetection()

enablePlaneDetection(): WorldOptions

Defined in: src/world/WorldOptions.ts:33

Enables plane detection.

Returns

WorldOptions


enableSegmentation()

enableSegmentation(): WorldOptions

Defined in: src/world/WorldOptions.ts:87

Enables semantic segmentation (person / background category masks).

Returns

WorldOptions


enableSoundDetection()

enableSoundDetection(): WorldOptions

Defined in: src/world/WorldOptions.ts:60

Enables sound detection.

Returns

WorldOptions