# LightRig

> Sun + hemisphere/ground fill with shadow configuration.

## Add it

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

Pulls `@runek/core@^0.15.0`, `three@^0.184.0`.

## Use it

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

<LightRig position={[0, 0, 0]} />
```

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

```json
{ "type": "LightRig", "props": { "position": [0, 0, 0] } }
```

## Props

| Prop | Type | Default | Description |
|---|---|---|---|
| `seed` | `number` |  | Accepted for the component contract; this component has no seeded variation yet. |
| `sunPosition` | `[x, y, z]` |  |  |
| `sunColor` | `color` |  |  |
| `sunIntensity` | `number` |  |  |
| `ambient` | `number` |  |  |
| `skyColor` | `color` | `"#bcd4ff"` |  |
| `groundColor` | `color` | `"#4a4030"` |  |
| `shadows` | `boolean` | `true` |  |
| `shadowRange` | `number` | `30` | Half-extent of the shadow camera frustum, in units. |

## Registry manifest

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

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