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
| Field | Type | Description |
|---|---|---|
from | number | string | Initial rotation value. |
to | number | string | Final rotation value. |
delay | number | Delay before animation starts (seconds). |
duration | number | Animation duration (seconds). |