# Battle station

An armoured orbital station whose hull is a real tiling: the breakup launches every plate down its own line behind a fracture front, and putting it back reassembles the sphere exactly.

> For the complete index, see [llms.txt](https://robocn.dev/llms.txt). A Markdown version of any page is available by appending `.md` to its URL or by sending an `Accept: text/markdown` header.

## Install

```bash
bunx --bun shadcn@latest add https://robocn.dev/r/battle-station.json
```

Registry item: `battle-station` · [`https://robocn.dev/r/battle-station.json`](https://robocn.dev/r/battle-station.json)

## Notes

- The hull is a tiling, not a texture: equal-area courses divided into equal longitudes, whose plate areas sum to exactly one sphere. `breakup` launches those plates rather than fading one drawing into another, and at 0 every plate is back where the tiling put it to the last bit — so the intact station is not a second drawing.
- It peels rather than inflates. A fracture front sweeps out from the rupture, so the near side lets go while the far side is still whole, and each plate then travels in a straight line at its own share of the speed.
- The trench is a course with nothing on it, and `plating` takes courses away pole-first, which is why the ribs and girdle rings show through. Both are the same tiling read a different way: under construction and coming apart are one ordering run in two directions.
- The dish is a paraboloid. Its focal length is `r²/(4d)` and each emitter ray is an axial ray reflected about the bowl's own normal, so the rays converge on the focus because the surface does. The beam that leaves the focus is illustrated.
- Solved: the tiling and its areas, every plate boundary, the fracture front and release order, the trajectories, the dish surface and the emitter convergence, the day-night line, the per-plate illumination, and the projection of all of it. Illustrated: the trench and hatch detail, the beam's taper and glow, the shock ring's expansion rate, and the rib profile.
- Nothing is simulated. No mass, no energy, no structural model and no collision — plates pass through each other's paths because nothing is stopping them, and `breakup` runs backwards as happily as forwards. It is a tiling coming apart, not a thing failing.
- An original archetype: a generic armoured orbital station. The dish position is a prop, the plating is a generic course pattern, and nothing here reproduces a craft, a crest or a paint scheme from anywhere.

## Usage

```tsx
import { BattleStation } from "@/components/ui/battle-station"

<BattleStation behavior="detonate" courses={9} perCourse={12} />
<BattleStation breakup={0.4} interactive onBreakupChange={setBreakup} />
```

## Props

| name | type | default | description |
| --- | --- | --- | --- |
| `view` | `"plan" | "front" | "profile" | "iso"` | `"front"` | Where the camera stands. One station, four projections: straight down, straight on, side elevation, or three-quarter from above. |
| `breakup` | `number` | — | Controlled breakup, 0 intact to 1 fully apart. Supplying it stops the loop. |
| `behavior` | `"patrol" | "charge" | "detonate" | "static"` | `"detonate"` | Patrol just turns it; charge winds the dish up and fires; detonate fires, lets the hull go and puts it back. |
| `speed` | `number` | `0.14` | Cycles per second. |
| `animate` | `boolean` | `true` | Off parks the machine at phase and stops rendering. A reduced-motion preference does the same. |
| `paused` | `boolean` | `false` | Freeze where it stands. |
| `phase` | `number` | `0` | Seconds of offset, so a row of machines breaks step. |
| `interactive` | `boolean` | `false` | Drag across it to work the breakup; arrows 5 percent, shift 15, Home intact and End apart. |
| `onBreakupChange` | `(breakup: number) => void` | — | Fires on every drag and key press, in controlled mode too. |
| `charge` | `number` | — | Controlled dish charge, 0 cold to 1 firing. Omit and the behaviour drives it. |
| `spin` | `number` | — | Controlled rotation about the pole, in degrees. Omit and the clock turns it. |
| `tilt` | `number` | `18` | Degrees the pole leans out of vertical. |
| `courses` | `number` | `9` | Armour courses pole to pole, clamped 3..21. Every course is exactly the same area. |
| `perCourse` | `number` | `12` | Plates round the equator, clamped 4..28. Every other course scales by its own cosine. |
| `plating` | `number` | `1` | How much of the hull is plated. Courses come off pole-first, showing the ribs and girdle rings under them. |
| `trench` | `boolean` | `true` | The equatorial service trench: a course carrying no plating at all, so it is a hole in the hull rather than a stripe on one. |
| `ribs` | `number` | `12` | Meridional ribs on the frame under the plating, clamped 0..24. |
| `dishLatitude / dishLongitude` | `number` | `34 / 72` | Degrees: where the focusing dish sits on the hull. It is placeable, not a fixed signature position. |
| `dishSpan` | `number` | `26` | Degrees of hull the dish bore takes up, measured from its axis. Clamped 8..48 — the plates inside it are removed. |
| `emitters` | `number` | `8` | Emitters round the bowl, clamped 0..16. Their rays are solved onto the focus. |
| `rupture` | `number` | `24` | Degrees round the body the hull fails at. The fracture front starts here. |
| `spread` | `number` | `0.75` | How far a plate travels by the end, in radii. Clamped 0..6. |
| `seed` | `number` | `5` | Any integer. The same seed is the same breakup, every render. |
| `sun` | `number` | `38` | Where the light is, in degrees round the body; 0 is behind the viewer. |
| `variant` | `"solid" | "outline" | "blueprint" | "wire"` | `"solid"` | How the machine is painted. Geometry never changes between variants. |
| `size` | `"xs" | "sm" | "md" | "lg" | "xl" | number` | `"md"` | Rendered width in pixels, or a step on the scale. |
| `signal` | `"idle" | "ready" | "warning"` | — | Status-lamp state using neutral, accent, or shell colour; each component documents its visual default in the demo. |
| `label` | `string` | — | Optional technical caption under the drawing. |
| `color` | `string` | `var(--robot-shell)` | Body panels — the colour the machine reads as. |
| `accent` | `string` | `var(--robot-accent)` | Status colour: tip light, live tool, readouts. |
| `metal` | `string` | `var(--robot-metal)` | Bare machined parts: collars, bolts, tool bodies. |
| `dark` | `string` | `var(--robot-dark)` | Cast joints, base, shadow side. |
| `palette` | `Partial<RobotPalette>` | — | Override any subset of roles at once, including glow and grid. |

## Source

- `src/components/ui/battle-station.tsx`
