FloatFieldInterpolator

FloatFieldInterpolator animates a floating point field of a node through a series of keyframes

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

Description

FloatFieldInterpolator animates a floating point field of a node through a series of keyframes.

Typically used as a child of an Animation node to animate fields like opacity, width, or height.

Parameters

NameTypeDescription
propsIFloatFieldInterpolatorProps

Example

<animation duration={10} repeat={true} control="start" easeFunction="linear">
    <floatFieldInterpolator
        key={[0.0, 0.5, 1.0]}
        keyValue={[1.0, 0.0, 1.0]}
        fieldToInterp="myPoster.opacity"
    />
</animation>

Types

IFloatFieldInterpolatorProps

Properties for the FloatFieldInterpolator node.

Specifies a keyframe animation sequence to be applied to a floating point field of a node (such as opacity, width, or height).

NameTypeDescription
keyValue?number[]Float values at each keyframe. 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?