# Grass

> Instanced grass blades (seeded scatter).

## Add it

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

Pulls `@react-three/fiber@^9.6.1`, `@runek/core@^0.15.0`, `three@^0.184.0`.

## Use it

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

<Grass position={[0, 0, 0]} height="tall" seed={1} />
```

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

```json
{ "type": "Grass", "props": { "position": [0, 0, 0], "height": "tall", "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. |
| `area` | `[number, number]` | `[10, 10]` | Patch extent `[width, depth]`, in units. |
| `count` | `number` | `600` |  |
| `height` | `"short" \| "medium" \| "tall" \| "very-tall" \| number` | `"medium"` | Blade height: a preset (`short` lawn, `medium`, `tall` meadow, `very-tall` reeds) or a number in units. Taller grass grows thicker blades that lean a little. Default `medium` (0.35). |
| `color` | `color` | palette `foliage` | Defaults to the world palette's `foliage` slot. |
| `sway` | `number` | `1` | Wind sway strength; 0 disables the animation. |
| `seed` | `number` | `1` | Seed for the deterministic variation: same seed, same result. |

## Registry manifest

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

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