Tone
A tone function of the cell, given by the page.
- Drawn with
- CPU only
- Chain
- tone
- Code
- @forgeron/shaders: toneMeta, toneCpu
/01 → What it is
- `data.tone(x, y)` per cell, row 0 at the top: the mask of a title, a gradient, a shape.
- What `ditherPath` runs at build time: a tone function through the ordered dither to an SVG path.
- CPU only: a preset with it runs on a 2D canvas.
/02 → In the examples
| Example | Chain |
|---|---|
| Title | tone → ordered → reveal → palette |
/03 → Versions
- /01 2×2
ditherPath(64, 16, (x) => x / 63, 2) - /02 4×4
ditherPath(64, 16, (x) => x / 63, 4) - /03 8×8
ditherPath(64, 16, (x) => x / 63, 8)
/04 → Use it
{
"type": "tone"
}import { toneMeta, toneCpu } from "@forgeron/shaders";
// toneMeta: description and params schema (validation, the editor)
// toneCpu: the CPU side, for bindChain then runCpuAPI → Options
No settings.
| Option | Type | Default | Description |
|---|