# roundedBox

function in `@dioramajs/diorama/kit`

```ts
import { roundedBox } from '@dioramajs/diorama/kit'
```

Signed distance in px from a rounded box, negative inside: `point` from the box centre, `half`
its half size, `radius` its corners. `clamp(0.5 - d, 0, 1)` is a 1 px antialiased mask.

```ts
function roundedBox(
  point: Node<'vec2'>,
  half: Node<'vec2'>,
  radius: number | Node<'float'>,
): Node<'float'>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `point` | `Node<'vec2'>` |  |
| `half` | `Node<'vec2'>` |  |
| `radius` | `number \| Node<'float'>` |  |

Also exported from `@dioramajs/effects/kit`.

Defined in [packages/effects/src/kit.ts](https://github.com/MasterKurosava/diorama/blob/main/packages/effects/src/kit.ts#L539).
