# Piece

interface in `@dioramajs/text/rotator`

```ts
import type { Piece } from '@dioramajs/text/rotator'
```

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).

```ts
interface Piece
```

## Members

| Name | Type | Description |
| --- | --- | --- |
| `ax` | `Vec3` |  |
| `ay` | `Vec3` |  |
| `opacity` | `number` |  |
| `origin` | `Vec3` |  |
| `rect` | `readonly [number, number, number, number]` | The region in element px, y down: x0, y0, x1, y1. |
| `shade` | `number` | Extra light on top of the shading: a shadow below 1. |
| `word` | `Word` |  |

Defined in [packages/text/src/rotator.ts](https://github.com/MasterKurosava/diorama/blob/main/packages/text/src/rotator.ts#L83).
