Hierarchy

  • FrameData

Methods

Methods

  • Type Parameters

    • T extends Path

    Parameters

    • path: T

    Returns any

    Example

    // Requires an effect with FaceTracking feature enabled to be fulfilled
    // @type {boolean | undefined}
    const isFace0Detected = frameData.get("frxRecognitionResult.faces.0.hasFace")
    // Requires an effect with FaceTracking feature enabled to be fulfilled
    // @type {number[] | undefined}
    const face0Landmarks = frameData.get("frxRecognitionResult.faces.0.landmarks")
    // Requires an effect with Ruler feature enabled to be fulfilled
    // @type {number | undefined}
    const distanceToFace = frameData.get("ruler")
  • Type Parameters

    • T extends Path

    Parameters

    • paths: T[]

    Returns any[]

    Example

    // Array of nose landmarks (positions 28, 29, 30, 31)
    // Requires an effect with FaceTracking enabled to be fulfilled
    // @type {[number, number, number, number] | undefined}
    const face0NoseLandmarks = frameData.get([28, 29, 30, 31].map((idx) => `frxRecognitionResult.faces.0.landmarks.${idx}`))