# NeonSign

> Words bent out of glass tube on a dark board, at the world's tube luminance level, that flicker: bad tubes buzz and drop out and the whole sign stutters now and then, as a pure function of the world clock and `seed` so every viewer sees the same sign. The tubes are drawn in code from the world's fonts. Decorative: no collider.

## Add it

```bash
npx @runek/cli add neon-sign
```

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

## Use it

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

<NeonSign position={[0, 0, 0]} text="OPEN LATE" color="#39ff88" flicker={0.6} seed={1} />
```

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

```json
{ "type": "NeonSign", "props": { "position": [0, 0, 0], "text": "OPEN LATE", "color": "#39ff88", "flicker": 0.6, "seed": 1 } }
```

## Props

| Prop | Type | Default | Description |
|---|---|---|---|
| `position` | `[x, y, z]` | `[0, 0, 0]` | The middle of the sign [x, y, z] in units. It faces local +Z. |
| `rotation` | `[x, y, z]` | `[0, 0, 0]` | Rotation [x, y, z] in radians. |
| `seed` | `number` | `1` | Picks which letters are the bad ones, and when everything stutters. |
| `text` | `string` | `"OPEN"` | The words, on one line. At most 24 characters are drawn. |
| `size` | `number` | `0.5` | Cap height in units. |
| `color` | `color` | `"#ff6418"` | Tube color, lit at the world's `tube` luminance level. |
| `variant` | `"display" \| "body"` | `"display"` | Which of the world's fonts the tubes are bent to. |
| `font` | `string` |  | A font URL to use instead of a world font. |
| `flicker` | `number` | `0.4` | How badly it flickers, 0 (a new sign) to 1 (one that should be taken down). |
| `faults` | `number` | `1` | How many letters have a bad tube of their own. |
| `board` | `boolean` | `true` | Draw the dark board the tubes are mounted on. |
| `light` | `boolean` | `false` | Ask the world's light pool for a real light, which flickers with the sign. |
| `intensity` | `number` | `60` | Candela of that light with every tube lit. |

## Registry manifest

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

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