Options
All
  • Public
  • Public/Protected
  • All
Menu

Attaches content to a face as it moves around in the camera view.

see

https://docs.zap.works/universal-ar/web-libraries/babylonjs/face-tracking/

Hierarchy

  • FaceTracker
    • FaceTracker

Index

Constructors

constructor

Properties

anchors

anchors: Map<string, FaceAnchor>

A map of the available anchors by their respective IDs.

onNewAnchor

onNewAnchor: Event1<FaceAnchor>

Emitted when a new anchor is created by the tracker.

onNotVisible

onNotVisible: Event1<FaceAnchor>

Emitted when an anchor goes from being visible in the previous camera frame, to not being visible in the current frame.

onVisible

onVisible: Event1<FaceAnchor>

Emitted when an anchor becomes visible in a camera frame.

visible

visible: Set<FaceAnchor>

The set of currently visible anchors.

Accessors

enabled

  • get enabled(): boolean
  • set enabled(e: boolean): void
  • Gets/sets the enabled state of the face tracker. Disable when not in use to save computational resources during frame processing.

    Returns boolean

  • Gets/sets the enabled state of the face tracker. Disable when not in use to save computational resources during frame processing.

    Parameters

    • e: boolean

    Returns void

maxFaces

  • get maxFaces(): number
  • set maxFaces(m: number): void
  • Gets/sets the maximum number of faces to track.

    By default only one face is tracked in any given frame. Increasing this number may reduce runtime performance.

    Returns number

  • Gets/sets the maximum number of faces to track.

    By default only one face is tracked in any given frame. Increasing this number may reduce runtime performance.

    Parameters

    • m: number

    Returns void

Methods

destroy

  • destroy(): void
  • Destroys the face tracker.

    Returns void

loadDefaultModel

  • loadDefaultModel(): Promise<void>
  • Loads the default face tracking model.

    Returns Promise<void>

    A promise that's resolved once the model is loaded. It may still take a few frames for the tracker to fully initialize and detect faces.

loadModel

  • loadModel(src: string | ArrayBuffer): Promise<void>
  • Loads face tracking model data.

    Parameters

    • src: string | ArrayBuffer

      A URL to, or ArrayBuffer of, model data.

    Returns Promise<void>

    A promise that's resolved once the model is loaded. It may still take a few frames for the tracker to fully initialize and detect faces.

Legend

  • Constructor
  • Property
  • Method

Generated using TypeDoc