Asset that contains multiple animation layers. Animation assets themselves do not handle playing or orchestrating animations. This is left to the animation player component to handle.

interface AnimationAsset {
    duration: number;
    fps: number;
    name: string;
    uniqueIdentifier: string;
    addLayer(layerName: string, layer: AnimationPropertyLayer): void;
    clearLayers(): void;
    createEvent(eventName: string, time: number): AnimationPropertyEventRegistration;
    deleteEvent(layerName: AnimationPropertyEventRegistration): void;
    deleteLayer(layerName: string): void;
    getLayer(layerName: string): AnimationPropertyLayer;
    getTypeName(): string;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
}

Hierarchy (view full)

Properties

duration: number

Animation duration in seconds.

fps: number

Denotes how many key frames this animation was sampled at.

name: string

The name of the Asset in Lens Studio.

uniqueIdentifier: string

Methods

  • Adds AnimationPropertyLayer to Animation asset.

    Parameters

    Returns void

  • Delete all the AnimationPropertyLayer in this AnimationAsset.

    Returns void

  • Delete the AnimationPropertyLayer named layerName.

    Parameters

    • layerName: string

    Returns void

  • 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