Represents of a series of RGB keyframes which together make an animation curve for a light intensity.

Constructors

Properties

keyFrameCount: number = 0
keyframesOffset: number = 0
ledMask: number = 0

Methods

  • Compares two Track instances.

    Parameters

    • other: Track

      The Track instance to compare with.

    Returns boolean

    Whether the two Track instances have the same data.

  • Evaluates an animation track's for a given time, in milliseconds, and fills returns arrays of led indices and colors. The returned colors are the given color modulated with the light intensity of the track for the given time. Values outside the track's range are clamped to first or last keyframe value.

    Parameters

    • bits: AnimationBits

      The animation bits with the keyframes data and color palette.

    • color: number

      The color for which to modulate the intensity.

    • time: number

      The time at which to evaluate the track.

    • ledCount: number
    • retIndices: number[]

      Array of LED indices to be updated.

    • retColors32: number[]

      Array of 32 bits colors to be updated.

    Returns number

    The number of LED indices that have been set in the returned arrays.

  • Evaluates an animation track's for a given time, in milliseconds. Values outside the track's range are clamped to first or last keyframe value.

    Parameters

    • bits: AnimationBits

      The animation bits with the keyframes data and color palette.

    • time: number

      The time at which to evaluate the track.

    Returns number

    The modulated color.

  • Extracts the LED indices from the LED bit mask.

    Parameters

    • retIndices: number[]

      Array of LED indices to be updated.

    Returns number

    The number of LED indices that have been set in the returned arrays.

  • Gets the track duration.

    Parameters

    Returns number

    The track duration.