# scrub

function in `@dioramajs/text/smoke`

```ts
import { scrub } from '@dioramajs/text/smoke'
```

The stage of a scrubbed heading, 0 condensed to 1 gone, and where its smoke goes: 1 up and away
as it leaves the top, -1 drifting in from below as it comes up. `start` is the middle of the box
on the page's first screen, so a heading there starts condensed.

```ts
function scrub(
  middle: number,
  height: number,
  viewport: number,
  start: number,
): [number, number]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `middle` | `number` |  |
| `height` | `number` |  |
| `viewport` | `number` |  |
| `start` | `number` |  |

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