# Sky

> Procedural atmosphere (drei Sky).

## Add it

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

Pulls `@react-three/drei@^10.7.7`, `@runek/core@^0.15.0`.

## Use it

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

<Sky 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": "Sky", "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]` |  | Direction of the sun; also where the bright spot appears. Set this to pin the sky to a fixed sun and bypass the world's day/night cycle. |
| `turbidity` | `number` | `8` |  |
| `rayleigh` | `number` | `1.4` |  |
| `nightColor` | `color` | `"#04060e"` | Background when the sun is below the horizon. |

## Registry manifest

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

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