# Piano

> A grand piano: a lacquered case on three legs, the lid propped open, eighty-eight keys, a pedal lyre and a bench a Person can sit on. One cuboid collider round the case.

## Add it

```bash
npx @runek/cli add piano
```

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

## Use it

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

<Piano position={[0, 0, 0]} lid={0.6} />
```

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

```json
{ "type": "Piano", "props": { "position": [0, 0, 0], "lid": 0.6 } }
```

## Props

| Prop | Type | Default | Description |
|---|---|---|---|
| `lid` | `number` | `0.6` | How far the lid is propped open, in radians; 0 shuts it. |
| `bench` | `boolean` | `true` | A bench in front of the keys. |
| `color` | `color` | `"#0e0e10"` | The case. Black lacquer unless given. |
| `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` |  | Accepted for the component contract; this component has no seeded variation yet. |

## Registry manifest

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

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