Preparing search index...

    Your connection to the anchor system for an area. Use it to create, save, delete, discover, and track anchors. Close it only when tracking is no longer required.

    Lens Scripting Version 376

    Hierarchy (View Summary)

    Index

    Properties

    area: string

    The area this session is using, or null if it was opened without one.

    Lens Scripting Version 376

    onAnchorNearby: event1<AnchorModule.Anchor, void>

    Called when a previously saved anchor is found nearby. Set it on an AnchorComponent to track it.

    Lens Scripting Version 376

    Methods

    • Delete all saved anchors for this Lens, across every area.

      Returns Promise<void>

      Lens Scripting Version 376

    • Permanently delete the anchors this Lens saved in the session's area. Fails if the session has no area.

      Returns Promise<void>

      Lens Scripting Version 376

    • Close the session and stop tracking.

      Returns Promise<void>

      Lens Scripting Version 376

    • Create an anchor at a world position (world-from-anchor). Set the returned Anchor on an AnchorComponent to start tracking.

      Parameters

      • toWorldFromAnchor: mat4

      Returns WorldAnchor

      Lens Scripting Version 376

    • Permanently delete a saved anchor. Tracking stops immediately.

      Parameters

      Returns Promise<void>

      Lens Scripting Version 376

    • Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().

      Returns string

      Lens Scripting Version 376

    • 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

    • Turn a saved anchor id (from Anchor.id) back into an anchor you can track.

      Parameters

      • anchorId: string

      Returns Promise<AnchorModule.Anchor>

      Lens Scripting Version 376