Vector2DFieldInterpolator

Vector2DFieldInterpolator animates a Vector2D field of a node through a series of keyframes

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

Description

Vector2DFieldInterpolator animates a Vector2D field of a node through a series of keyframes.

Most commonly used to animate translation coordinates for moving nodes across the screen. Typically used as a child of an Animation node.

Parameters

NameTypeDescription
propsIVector2DFieldInterpolatorProps

Example

<animation duration={10} repeat={true} control="start" easeFunction="linear">
    <vector2dFieldInterpolator
        key={[0.0, 0.5, 1.0]}
        keyValue={[[318, 8], [656, 8], [318, 8]]}
        fieldToInterp="myLabel.translation"
    />
</animation>

Types

IVector2DFieldInterpolatorProps

Properties for the Vector2DFieldInterpolator node.

Specifies a keyframe animation sequence to be applied to a Vector2D field of a node, most commonly used to animate translation coordinates.

NameTypeDescription
keyValue?Vector2D[]Vector2D 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?