bake function
Bakes the distance from the ink along `dir` (box px, y down) up to `reach` px: 0 at the ink, 255 at `reach` or with no ink behind.
import { bake } from '@dioramajs/text/extrude'. Doubling: each pass takes the smaller of a pixel and the pixel s back plus s, for s = 1, 2, 4…, so log2 of the reach in canvas draws.
function bake(
layout: Raster,
dir: readonly [number, number],
reach: number,
): Baked | undefinedParameters
| Name | Type | Description |
|---|---|---|
layout | Raster | |
dir | readonly [number, number] | |
reach | number |
Defined in packages/text/src/extrude.ts.