MarkerAsset
Lens Studio v1.7.0+
Scripting Name: Asset.MarkerAsset
Inherits from Asset
Description
Defines a marker to use for Marker Tracking with MarkerTrackingComponent. For more information, see the Marker Tracking guide.
Methods
getAspectRatio()
: Number
Returns the aspect ratio (width / height) of the texture used by the marker asset.
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.
Inherited Methods
isSame(SerializableWithUID other)
: Boolean
Returns true if this object is the same as other
. Useful for checking if two references point to the same thing.
getTypeName()
: String
Returns the name of this object’s type.
isOfType(String type)
: Boolean
Returns true if the object matches or derives from the passed in type.
Inherited Properties
name
: String
The name of the Asset in Lens Studio.
Examples
// Set the MarkerAsset on a MarkerTracking component
//@input Component.MarkerTrackingComponent markerTracker
//@input Asset.MarkerAsset marker
script.markerTracker.marker = script.marker;
Still Looking for help?
Visit Support