An asset that contains one or more animation curves. When evaluating multiple values, the values are selected from left to right in order. For example, for a vec3 containing x,y,z , it will correspond to track index 0, 1, 2 from left to right.

interface AnimationCurveTrack {
    name: string;
    uniqueIdentifier: string;
    evaluateNumber(time: number): number;
    evaluateRotation(time: number): quat;
    evaluateVec2(time: number): vec2;
    evaluateVec3(time: number): vec3;
    evaluateVec4(time: number): vec4;
    getProperty(key: string): AnimationCurve;
    getPropertyKeys(): string[];
    getTypeName(): string;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
    setProperty(key: string, curve: AnimationCurve): void;
}

Hierarchy (view full)

Properties

name: string

The name of the Asset in Lens Studio.

uniqueIdentifier: string

Methods

  • Samples the track at the given time to get some value.

    Parameters

    • time: number

    Returns number

  • Samples the track at the given time to get some value. Returns 0 for non-existent channels.

    Parameters

    • time: number

    Returns quat

  • Samples the track at the given time to get some value. Returns 0 for non-existent channels.

    Parameters

    • time: number

    Returns vec2

  • Samples the track at the given time to get some value. Returns 0 for non-existent channels.

    Parameters

    • time: number

    Returns vec3

  • Samples the track at the given time to get some value. Returns 0 for non-existent channels.

    Parameters

    • time: number

    Returns vec4

  • Returns an array of strings, which are the names of properties associated with the AnimationCurveTrack.

    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

  • Sets an AnimationCurve to a given key.

    Parameters

    Returns void