Skip to main content

Module transform

Module transform 

Source
Expand description

CSS transform builder — Remotion makeTransform / @remotion/animation-utils.

§Example

use rust_motion_animation::transform::{make_transform, rotate, scale, translate_x};

let css = make_transform(&[rotate(45.0), scale(1.5), translate_x(100.0)]);
assert_eq!(css, "rotate(45deg) scale(1.5) translateX(100px)");

Enums§

StyleValue
A CSS style value — string, pixel, percent, or unitless number.
TransformOp
A single CSS transform function token.

Functions§

interpolate_styles
Interpolates CSS style properties across keyframes. Equivalent to Remotion’s interpolateStyles(input, inputRange, outputStylesRange).
make_transform
Combines CSS transform operations into a single transform property string. Equivalent to Remotion’s makeTransform(transforms).
matrix
matrix3d
perspective
rotate
rotate3d
rotate_x
rotate_y
rotate_z
scale
scale3d
scale_x
scale_y
scale_z
skew
skew_x
skew_y
translate
translate3d
translate_x
translate_y
translate_z

Type Aliases§

StyleMap
A keyframe style map: property name → StyleValue.