# @dioramajs/text/rotator

Exports of @dioramajs/text/rotator.

## Functions and values

- [default](/docs/api/text-rotator/default.md): Words take turns in a phrase on the faces of a real 3D shape: a cube or a drum that rolls to the next word, a split flap falling over its hinge or a strip folding into the page, lit from above and seen in perspective. The box eases to the width of the next word; between turns the word is plain DOM text.
- [fall](/docs/api/text-rotator/fall.md): A flap falling: faster and faster, then one small bounce on landing.
- [overshoot](/docs/api/text-rotator/overshoot.md): Speeds up like cubicInOut, then runs a few percent past the end and settles back.
- [pieces](/docs/api/text-rotator/pieces.md): Where the pieces of radius turn are at `progress` (0 the word leaving, flat; 1 the word coming, flat), back to front. `height` is the element's box height. Under reduced motion the words fade.

## Types

- [Around](/docs/api/text-rotator/types/around.md): The words a turn shows, by place from the word leaving (0) and the word coming (1).
- [Axis](/docs/api/text-rotator/types/axis.md)
- [Piece](/docs/api/text-rotator/types/piece.md): A flat region of a word moved into 3D: a point (x, y) of the region, y down, lands at `origin + ax * x - ay * y` in the element's frame (origin at its top left, y up, z towards the viewer).
- [Style](/docs/api/text-rotator/types/style.md)
- [Vec3](/docs/api/text-rotator/types/vec3.md)
- [Word](/docs/api/text-rotator/types/word.md): One word as laid out at rest, in element px (y down from the element's top left).
