Documentation
    Preparing search index...

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

    Index

    Constructors

    Properties

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

    Methods

    • Compares two RgbTrack instances.

      Parameters

      • other: RgbTrack

        The RgbTrack instance to compare with.

      Returns boolean

      Whether the two RgbTrack instances have the same data.

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

      Parameters

      • time: number

        The time at which to evaluate the track.

      • bits: AnimationBits

        The animation bits with the RGB keyframes data and color palette.

      • die: VirtualDie

        The virtual die on which the animation is running.

      • 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.

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

      Parameters

      • time: number

        The time at which to evaluate the track.

      • bits: AnimationBits

        The animation bits with the RGB keyframes data and color palette.

      • die: VirtualDie

        The virtual die on which the animation is running.

      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

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