# puddle

function in `@dioramajs/text/water`

```ts
import { puddle } from '@dioramajs/text/water'
```

The puddle around the text in a `width` by `height` box: a signed distance to its shore in
px, negative in the water, rows top down, `scale` texels per px. The shore wanders between
SHORE ems past the glyphs and rounds off where it meets the box, so nothing marks the box.

```ts
function puddle(
  r: Raster,
  width: number,
  height: number,
  em: number,
  seed?: number,
): { data: Float32Array; height: number; scale: number; width: number }
```

| Parameter | Type | Description |
| --- | --- | --- |
| `r` | `Raster` |  |
| `width` | `number` |  |
| `height` | `number` |  |
| `em` | `number` |  |
| `seed?` | `number` |  |

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