# Casing droid

An armoured conical casing unit: hemisphere skirt, caged neck, rotating dome, an eyestalk that swings and elevates, and a swappable manipulator.

> 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/casing-droid.json
```

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

## Notes

- Front elevation is the drawing it always had. The casing is a cone of revolution with a dome on top, and the manipulator and emitter reach forward out of the shoulders rather than sideways across the picture.
- Heading is cyclic: 360 renders identically to 0 rather than sticking at a limit.
- An original armoured-casing archetype; the emitter is a ringed rod with no projectile effect.

## Usage

```tsx
import { CasingDroid } from "@/components/ui/casing-droid"

<CasingDroid domeAngle={40} eyeElevation={-12} manipulator="clamp" emitter lamps />
```

## Props

| name | type | default | description |
| --- | --- | --- | --- |
| `view` | `"plan" | "front" | "profile" | "iso"` | `"front"` | Where the camera stands. One droid, four projections: straight down, straight on, side elevation, or three-quarter from above. |
| `skirt` | `"banded" | "smooth" | "ribbed"` | `"banded"` | Lower casing treatment; the flare geometry is shared. |
| `hemisphereRows` | `number` | `3` | Rows of skirt hemispheres, clamped to 2–4. |
| `hemisphereColumns` | `number` | `4` | Hemispheres across each row, clamped to 3–6; the studs shrink to fit. |
| `dome` | `"round" | "flat" | "faceted"` | `"round"` | Upper sensor-shell silhouette, drawn into the same envelope. |
| `collar` | `"slats" | "mesh" | "plain"` | `"slats"` | Mid-section treatment between the skirt and the neck. |
| `neckRings` | `number` | `3` | Rings in the neck cage, clamped to 2–5; the cage spans the same gap either way. |
| `stalkLength` | `number` | `1` | Eyestalk reach as a multiple of standard, clamped to 0.5–1.8. |
| `domeAngle` | `number` | `0` | Dome heading in degrees, wrapped to −180..180; swings and foreshortens the eyestalk. |
| `eyeElevation` | `number` | `0` | Eyestalk pitch in degrees, clamped to −28..28. |
| `manipulator` | `"none" | "suction" | "clamp" | "probe"` | `"suction"` | Tool on the left appendage. |
| `emitter` | `"none" | "rod" | "dish" | "array"` | `"array"` | Hardware on the right appendage: bare rod, dish, or the ringed array. |
| `lamps` | `"none" | "pair" | "quad"` | `"pair"` | Dome lamp arrangement. |
| `behavior` | `"patrol" | "survey" | "idle" | "static"` | `"patrol"` | Patrol holds a bearing, swings to the next and holds again; survey sweeps the room; idle is the drift of a machine that is still switched on. |
| `speed` | `number` | `0.18` | Sweeps 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` | `true` | The eyestalk follows the pointer — which is, after all, the entire point of this machine. |
| `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. |
| `showGround` | `boolean` | `true` | Draw the contact line or shadow beneath the droid. |
| `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/casing-droid.tsx`
