Lens Scripting API

    Class LocationAsset

    Provides a frame of reference in which to localize objects to the real world. Use with LocatedAtComponent.

    Hierarchy (View Summary, Expand)

    Index

    Constructors

    Properties

    name: string

    The name of the Asset in Lens Studio.

    uniqueIdentifier: string

    Methods

    • Returns the LocationAsset Tile that is specified by the containing tile and the specified xOffset, yOffset and zoomOffset. When zooming in, index offset is relative to the center. When zooming out or not zooming, index offset is relative to the containing tile.

      Parameters

      • xOffset: number
      • yOffset: number
      • zoomOffset: number

      Returns LocationAsset

    • Get an Anchor based on the given GPS coordinate.

      Parameters

      • longitude: number
      • latitude: number

      Returns Anchor

    • Gets nearby LocationAsset tiles, where each argument represents the x,y,z position relative to the current LocationAsset.

      Parameters

      • xOffset: number
      • yOffset: number
      • zoomOffset: number

      Returns LocationAsset

    • Get a Proxy LocationAsset with the proxyId embedded in the locationId. proxyId must not be null, must start with an alpha char, and consist only of alphanumerics or ".".

      Parameters

      • proxyId: string

      Returns LocationAsset

    • Gets the Proxy LocationID if the LocationAsset is a proxyLocation; returns null otherwise. This is useful in instances where a callback may return a mix of different location assets, and the creator of the proxy asset has specific handling in mind for particular proxy locations.

      Returns string

    • Returns the name of this object's type.

      Returns string

    • 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

    MMNEPVFCICPMFPCPTTAAATR