# @dioramajs/text/water

Exports of @dioramajs/text/water.

## Functions and values

- [CALM](/docs/api/text-water/calm.md): Below this wave height (cells) the water counts as calm and the simulation is cleared.
- [decay](/docs/api/text-water/decay.md): Per-step factor that leaves waves `exp(-rate)` of their height after a second.
- [default](/docs/api/text-water/default.md): The heading lies under water: a surface simulated on the GPU bends the letters and the page beneath, focuses light into dancing caustics on them and reflects the sky, with a tint that deepens the farther the light goes. The pointer drags ripples and clicks drop them; rain rings out on its own; ice stays still under frost and cracks until the pointer melts a clear patch.
- [grid](/docs/api/text-water/grid.md): The grid of the simulation over a domain of `width` by `height` px: cells across, down and the cell size.
- [iceMap](/docs/api/text-water/ice-map.md): The ice over a domain of `width` by `height` texels with `em` texels to the em, rows top down, RGBA bytes: red the cracks, green the frost (thick at the edges, in patches and along the cracks), blue the cracks blurred, for the light they bend.
- [Pond](/docs/api/text-water/pond.md): The drops waiting for the simulation and a bound on how high the waves still are, so frames stop once the water is calm.
- [puddle](/docs/api/text-water/puddle.md): 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.
- [SHORE](/docs/api/text-water/shore.md): Ems the water reaches past the glyphs, at least and at most, along its wandering shore.
- [STEPS](/docs/api/text-water/steps.md): Simulation steps a second, at most per frame, and drops one step takes.
- [SWELL](/docs/api/text-water/swell.md): The swell under every style: five waves from different directions whose crests focus light into the net of caustics. Their strength is the share of the focal distance their curvature reaches, so the net looks the same at any font size.

## Types

- [Drop](/docs/api/text-water/types/drop.md): A drop on the water in cells, y up: its place, radius and height (negative digs a crater).
- [Style](/docs/api/text-water/types/style.md)
- [Wave](/docs/api/text-water/types/wave.md): One wave of the swell: wavelength (em), direction (rad, box axes), focusing strength, phase.
