# membrane

function in `@dioramajs/text/inflate`

```ts
import { membrane } from '@dioramajs/text/inflate'
```

The radius of the round profile over a signed distance field `dist` (CSS px, positive inside,
`cols` by `rows` cells of `cell` px), written d below. The letters are inflated like a membrane under pressure: `u` solves
Poisson's equation, zero on the glyph edge, coarse to fine. Where a stroke of half-width a is
straight, u = d (2a - d) / 2, so the radius u / d + d / 2 is a, and the height
sqrt(d (2a - d)) is a round tube; a dot becomes a dome and a joint bulges. Cells outside get the
radius of the edge next to them.

```ts
function membrane(
  dist: Float32Array,
  cols: number,
  rows: number,
  cell: number,
  pause?: Pause,
): Promise<Float32Array<ArrayBufferLike>>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `dist` | `Float32Array` |  |
| `cols` | `number` |  |
| `rows` | `number` |  |
| `cell` | `number` |  |
| `pause?` | `Pause` |  |

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