# Rug

> Procedural striped rug (seeded stripes, no textures).

## Add it

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

Pulls `@runek/core@^0.15.0`.

## Use it

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

<Rug 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": "Rug", "props": { "position": [0, 0, 0], "seed": 1 } }
```

## Props

| Prop | Type | Default | Description |
|---|---|---|---|
| `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. |
| `size` | `[number, number]` | `[3, 2]` | `[width, depth]` in units. |
| `baseColor` | `color` | palette `fabric` | Defaults to the world palette's `fabric` slot. |
| `borderColor` | `color` | palette `accent` | Defaults to the world palette's `accent` slot. |
| `accentColor` | `color` | `"#9c5252"` |  |
| `seed` | `number` | `1` | Seed for the deterministic variation: same seed, same result. |

## Registry manifest

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

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