Skip to main content

Rotation

Use rotation to animate a component around the Z axis.

Type signature

type Rotation = {
from: number | string;
to: number | string;
delay?: number;
duration?: number;
};

Supported components

Example

import { IsometricPlane } from "isometric-react/isometric-plane";

export function RotatingCube() {
return (
<IsometricPlane
size={{ width: 5, height: 5 }}
color="cyan"
rotation={{ from: 0, to: 360, duration: 4 }}
/>
);
}

Rendered example

Fields

FieldTypeDescription
fromnumber | stringInitial rotation value.
tonumber | stringFinal rotation value.
delaynumberDelay before animation starts (seconds).
durationnumberAnimation duration (seconds).