Vector2DFieldInterpolator
Vector2DFieldInterpolator animates a Vector2D field of a node through a series of keyframes
import { Vector2DFieldInterpolator } from "@roku-sdk/components";Vector2DFieldInterpolator(props: IVector2DFieldInterpolatorProps): JSX.ElementDescription
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
| Name | Type | Description |
|---|---|---|
props | IVector2DFieldInterpolatorProps |
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.
| Name | Type | Description |
|---|---|---|
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.
Updated about 6 hours ago
What’s Next
Did this page help you?