Lens Scripting API
    Preparing search index...

    Class DepthFrameSessionExposes User Data

    Used for receiving DepthFrameData on Spectacles device.

    const depthModule = require("LensStudio:DepthModule");

    const session = depthModule.createDepthFrameSession();

    session.onNewFrame.add((depthFrameData) => {
    // Make use of depth frame data
    });

    session.start();
    session.stop();

    Hierarchy (View Summary)

    Index

    Properties

    onNewFrame: event1<DepthFrameData, void>

    Register a callback to be called whenever new DepthFrameData is available. On Spectacles, the depth update rate is different from the color frame update rate and the render update rate.

    Methods

    • Returns true if the object matches or derives from the passed in type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

      Parameters

      Returns boolean

    • Exposes User Data

      Stops depth estimation for the DepthFrameSession on Spectacles.

      Returns void