Records keyframes and keeps track of the total length (in seconds) of all the keyframes. Length between two consecutive keyframes is determined by the first.

Length is calculated whenever a new keyframe is added or removed. When manually editing any keyframe in the recorder's length, call recalculateLength() to fix.

Hierarchy

  • KeyframeRecorder

Constructors

Properties

keyframes: TrackKeyframe[]
length: number

Methods

  • Adds the keyframes from the given range from the given recorder to the end of this

    Returns

    Parameters

    Returns Result<true, string>

  • Gets the track position of the last keyframe in this recorder

    Returns number

  • Returns the length (in seconds) of the resulting animation

    Returns

    Returns number

  • Returns the number of keyframes in this recorder.

    Returns

    Returns number

  • Manually recalculates the length of the resulting animation from this recorder and returns it.

    Recommended to only do this if needed.

    Returns

    length

    Returns number

Generated using TypeDoc