# CoffeeMachine

> A countertop coffee machine, espresso or drip, with a cup or carafe and a few puffs of steam. Sits on a Counter.

## Add it

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

Pulls `@react-three/fiber@^9.6.1`, `@react-three/rapier@^2.2.0`, `@runek/core@^0.13.0`, `three@^0.184.0`.

## Use it

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

<CoffeeMachine position={[0, 0, 0]} seed={1} />
```

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

```json
{ "type": "CoffeeMachine", "props": { "position": [0, 0, 0], "seed": 1 } }
```

## Props

| Prop | Type | Default | Description |
|---|---|---|---|
| `kind` | `"espresso" \| "drip"` |  | Seeded when unset. |
| `color` | `color` |  | Body color. Seeded from a few appliance finishes when unset. |
| `steam` | `boolean` | `true` | A few puffs of steam rising from the cup or carafe. |
| `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/coffeemachine.json](https://runek.nullorder.org/r/components/coffeemachine.json): Self-contained JSON: inlined source plus resolved dependencies, exactly what `runek add coffeemachine` fetches.

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