# bake

function in `@dioramajs/text/extrude`

```ts
import { bake } from '@dioramajs/text/extrude'
```

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. 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.

```ts
function bake(
  layout: Raster,
  dir: readonly [number, number],
  reach: number,
): Baked | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `layout` | `Raster` |  |
| `dir` | `readonly [number, number]` |  |
| `reach` | `number` |  |

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