# @dioramajs/text/text-glitch

Exports of @dioramajs/text/text-glitch.

## Functions and values

- [chance](/docs/api/text-text-glitch/chance.md): A uniform random number in [0, 1) for the seed and two counters: the same on every load.
- [default](/docs/api/text-text-glitch/default.md): A heading glitches like a broken signal, in depth: for a fraction of a second it breaks into slabs that jump towards the viewer and turn in perspective, its red and cyan layers part at different depths, blocks extrude out of the page or a hologram trails behind it. Then it snaps back flat. At rest the element is plain DOM text.
- [flashes](/docs/api/text-text-glitch/flashes.md): Keeps the text from flashing: the returned function passes the opacity of each drawn frame at `now` seconds and holds it at 1 for a dip that would be the fourth to start within a second.
- [flicker](/docs/api/text-text-glitch/flicker.md): Opacity of the whole text at step `n` of a burst of `steps`: it dims while the signal drops out between the hits, and late in the second hit it may flicker once.
- [gap](/docs/api/text-text-glitch/gap.md): Steps of a burst where the signal drops out between its two hits; none in a short burst.
- [LOOKS](/docs/api/text-text-glitch/looks.md)
- [pattern](/docs/api/text-text-glitch/pattern.md): Cuts the text into horizontal slabs for one step of the pattern and writes their layers back to front: the hologram, the red and cyan layers, the sides of an extruded block, then the text itself on top. Slabs left in place merge, and at level 0 it is the flat text in one layer.
- [slabs](/docs/api/text-text-glitch/slabs.md)
- [strike](/docs/api/text-text-glitch/strike.md): Strength of step `n` of burst `burst` that lasts `steps`, 0..1. It hits twice: each hit starts in full, then stutters (some steps drop out) and fades; between them the signal drops out.

## Types

- [Look](/docs/api/text-text-glitch/types/look.md): How a style breaks the text. Distances are in em, so a heading and a label break alike.
- [Slabs](/docs/api/text-text-glitch/types/slabs.md): Instance attributes, one row per layer of a slab, in draw order.
- [Step](/docs/api/text-text-glitch/types/step.md): What one step of the pattern needs to know.
