ColorFieldInterpolator

ColorFieldInterpolator animates a color field of a node through a series of keyframes

import { ColorFieldInterpolator } from "@roku-sdk/components";
ColorFieldInterpolator(props: IColorFieldInterpolatorProps): JSX.Element

Description

ColorFieldInterpolator animates a color field of a node through a series of keyframes.

Interpolation is performed in HSV color space for visually pleasing transitions. Typically used as a child of an Animation node.

Parameters

NameTypeDescription
propsIColorFieldInterpolatorProps

Example

<animation duration={10} repeat={true} control="start" easeFunction="linear">
    <colorFieldInterpolator
        key={[0.0, 0.5, 1.0]}
        keyValue={["0x0000CCFF", "0x00000FFF", "0x0000CCFF"]}
        fieldToInterp="myRectangle.color"
    />
</animation>

Types

IColorFieldInterpolatorProps

Properties for the ColorFieldInterpolator node.

Specifies a keyframe animation sequence to be applied to a color field of a node. Interpolation is performed in HSV color space for visually pleasing results.

NameTypeDescription
keyValue?string[]Color values at each keyframe (e.g. "0xFF0000FF" for red). Each value corresponds to a value in the key array. Must match the length of key.

Extends IFieldInterpolatorPropsBase.


What’s Next

Did this page help you?