# BeachChair

> A sun lounger for a beach or pool deck: a slatted frame on four legs along local Z, a flat bed and a back raised on a hinge (recline), cushioned. Seeded cushion and teak or white frame. One cuboid collider round the bed.

## Add it

```bash
npx @runek/cli add beach-chair
```

Pulls `@react-three/rapier@^2.2.0`, `@runek/core@^0.18.0`.

## Use it

```tsx
import { BeachChair } from './runek/BeachChair'

<BeachChair position={[0, 0, 0]} recline={0.7} seed={1} />
```

Or as a node in a world file ([worlds as data](https://runek.nullorder.org/docs/worlds-as-data.md)):

```json
{ "type": "BeachChair", "props": { "position": [0, 0, 0], "recline": 0.7, "seed": 1 } }
```

## Props

| Prop | Type | Default | Description |
|---|---|---|---|
| `length` | `number` | `1.9` | Along local Z, in units. |
| `width` | `number` | `0.66` | Width, in units. |
| `height` | `number` | `0.36` | To the top of the cushion on the bed, in units. |
| `recline` | `number` | `0.7` | How far the back is raised from flat, in radians. |
| `color` | `color` |  | The cushion. Seeded from beach colours when unset. |
| `frameColor` | `color` |  | The frame. Seeded teak or white when unset. |
| `position` | `[x, y, z]` | `[0, 0, 0]` | Position [x, y, z] in units (1 unit = 1 m, Y-up). |
| `rotation` | `[x, y, z]` | `[0, 0, 0]` | Euler rotation [x, y, z] in radians. |
| `seed` | `number` | `1` | Seed for the deterministic variation: same seed, same result. |

## Registry manifest

[https://runek.nullorder.org/r/components/beach-chair.json](https://runek.nullorder.org/r/components/beach-chair.json): Self-contained JSON: inlined source plus resolved dependencies, exactly what `runek add beach-chair` fetches.

Browse the whole catalog in the **[gallery →](https://runek.nullorder.org/gallery)**.
