# Siege walker

A four-legged armoured transport walker on the same solver: four feet at the corners of a long rectangle already contain its mass, so it walks nearly level — and cannot pace at all.

> 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/siege-walker.json
```

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

## Notes

- The same solver as the scout walker, and the contrast is the point: four feet at the corners of a long rectangle almost always contain the mass already, so the demanded attitude is small and this machine walks nearly level. Its walk is a lateral sequence — hind, then the fore on that side, then the other — which never leaves fewer than three feet down.
- `pace` throws that away. Swinging both legs of a side together leaves a support that is a line down one flank, half a hull width out, and a hull this shape cannot roll far enough to put its mass on it: the roll clamps at the stop, the margin goes negative and the lamp turns. Nothing scripts that; it falls out of the footfall order.
- Side elevation is the view it is drawn in, because a long hull is a side elevation. The head is carried on a drooping segmented neck and yaws with the aim; the hull, the flank plating and the hips all ride the one transform the solver used.
- Illustrative where it says so: the footfall is a schedule, the load share is that schedule weighted by how near the mass is, and there is no inertia, payload or overturning moment. Off balance means it could not hold that pose standing still.
- An original archetype — a four-legged siege transport — named for its job. No franchise, insignia or paint scheme, here or in the demo; the default palette is the theme's.

## Usage

```tsx
import { SiegeWalker } from "@/components/ui/siege-walker"

<SiegeWalker behavior="march" showSupport />

// The gait it cannot hold: both legs of a side swing together.
<SiegeWalker gait="pace" stride={0.25} view="front" showSupport />
```

## Props

| name | type | default | description |
| --- | --- | --- | --- |
| `view` | `"plan" | "front" | "profile" | "iso"` | `"profile"` | Where the camera stands. One walker, four projections: straight down, straight on, side elevation, or three-quarter from above. |
| `behavior` | `"march" | "haul" | "pace" | "halt" | "static"` | `"march"` | March is a lateral-sequence walk; haul is slow and low with three feet always down; pace swings both legs of a side together, which this hull cannot hold; halt stands and scans. |
| `gait` | `"stand" | "walk" | "creep" | "pace"` | — | Footfall pattern. Omit and the behaviour picks one. |
| `stride` | `number` | — | Controlled gait cycle, 0–1. Supplying it stops the clock. |
| `speed` | `number` | `0.32` | Gait 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. |
| `lean` | `Vec2 | null` | `null` | Controlled attitude push, −1..1 of each stop: x rolls it, y pitches it. It beats the drag, and the gait still runs underneath. |
| `onLeanChange` | `(lean: Vec2) => void` | — | The lean a drag or a key moved it to, reported in controlled mode too. |
| `interactive` | `boolean` | `true` | Press and drag to push the hull off its feet, or use the arrow keys; Home re-centres. Release eases it back into the gait. |
| `height` | `number` | — | Ride height 0–1, clamped to what the legs can still reach once the stride and the attitude stops are paid for. |
| `step` | `number` | — | Foot travel, 0–1. |
| `lift` | `number` | `0.5` | Swing clearance, 0–1. |
| `look` | `Vec2 | null` | `null` | Controlled aim in −1..1: x yaws the head on the neck, y raises and lowers it. |
| `track` | `boolean` | `true` | The head follows the page pointer while look is null. |
| `showSupport` | `boolean` | `false` | Draw the support polygon, a ring at each loaded foot sized by its share, and the mass on the plumb line down to where it falls. |
| `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/siege-walker.tsx`
