# Ion interceptor

A twin ion-drive interceptor: hexagonal panels pitching on lateral pylons, around a pod that yaws inside them and carries its viewport and emitters round with it.

> 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/ion-interceptor.json
```

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

## Notes

- The panels are flat plates in space, not artwork: the same geometry is a pair of tall hexagons head-on, a pair of lines from straight above when they are square, and a pair of widening slabs as they come round. Pitch is a rotation about each pylon's own axis.
- The pod turns inside the pylons, so the viewport, the armoured face and the emitters all come round with it while the pylons and panels stay where the airframe put them.
- A science-fiction archetype and nothing more: no character, no markings, no livery. There is no aerodynamics here and no ion physics either.

## Usage

```tsx
import { IonInterceptor } from "@/components/ui/ion-interceptor"

<IonInterceptor behavior="patrol" />

// Square to the camera the panels are hexagons; from above they are lines.
<IonInterceptor panelPitch={0} view="front" />
<IonInterceptor panelPitch={55} yaw={30} view="plan" />
```

## Props

| name | type | default | description |
| --- | --- | --- | --- |
| `view` | `"plan" | "front" | "profile" | "iso"` | `"front"` | Where the camera stands. One interceptor, four projections: straight down, straight on, side elevation, or three-quarter from above. |
| `panelPitch` | `number` | — | Panel pitch about the pylons in degrees, clamped to ±80. Supplying it stops the loop. |
| `onPanelPitchChange` | `(pitch: number) => void` | — | The commanded pitch, while a person is working the panels. |
| `yaw` | `number` | — | The pod's own yaw inside the pylons, ±55 degrees. Omit it and the behaviour turns it. |
| `behavior` | `"patrol" | "intercept" | "static"` | `"patrol"` | Drift with the panels near square, or work them hard while the pod hunts. |
| `ribs` | `number` | `3` | Ribs across each panel's face, 0–6. They foreshorten with the panel and vanish with it edge-on. |
| `speed` | `number` | `0.3` | Panel 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` | Press and drag across the interceptor to pitch the panels; arrow keys move them 5° at a time. |
| `active` | `boolean` | — | Light the viewport and the emitters. |
| `label` | `string` | — | Caption underneath the interceptor. |
| `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. |
| `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/ion-interceptor.tsx`
