Defines a marker to use for Marker Tracking with MarkerTrackingComponent. For more information, see the Marker Tracking guide.

// Set the MarkerAsset on a MarkerTracking component

//@input Component.MarkerTrackingComponent markerTracker
//@input Asset.MarkerAsset marker

script.markerTracker.marker = script.marker;
interface MarkerAsset {
    height: number;
    name: string;
    uniqueIdentifier: string;
    getAspectRatio(): number;
    getTypeName(): string;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
}

Hierarchy (view full)

Properties

height: number

The height of the marker asset in real-life centimeters. Used to provide accurate transformation. A MarkerTrackingComponent using this MarkerAsset will be scaled so that one unit in the SceneObject's local space is equal to one centimeter in real life.

name: string

The name of the Asset in Lens Studio.

uniqueIdentifier: string

Methods

  • Returns the aspect ratio (width / height) of the texture used by the marker asset.

    Returns number

  • 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