Preparing search index...

    Class AnimationAsset

    Represents animation data. Can have multiple AnimationPropertyLayers. Used in AnimationClip.

    AnimationAssets themselves do not handle playing or orchestrating animations. This is left to the AnimationPlayer component to handle.

    Lens Scripting Version 253

    // @input Asset.AnimationAsset animAsset
    const startEventName = 'animStarted';
    const startTimestamp = 0;
    const e = script.animAsset.createEvent(startEventName, startTimestamp);
    const endEventName = 'animEnded';
    const endTimestamp = script.animAsset.duration;
    script.animAsset.createEvent(endEventName, endTimestamp);

    Hierarchy (View Summary)

    Index

    Properties

    duration: number

    Animation duration in seconds.

    Lens Scripting Version 253

    fps: number

    Denotes how many key frames this animation was sampled at.

    Lens Scripting Version 253

    name: string

    The name of the Asset in Lens Studio.

    ""
    
    uniqueIdentifier: string

    Lens Scripting Version 176

    Methods

    • Delete all the AnimationPropertyLayer in this AnimationAsset.

      Returns void

      Lens Scripting Version 253

    • Delete the AnimationPropertyLayer named layerName.

      Parameters

      • layerName: string

      Returns void

      Lens Scripting Version 253

    • 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