# Jack-up rig

One number that is both halves of the drawing: the legs are a fixed length, so raising the hull out of the water shortens the stick-up above it by exactly the same amount.

> 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/jackup-rig.json
```

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

## Notes

- The legs are trusses in world space and the hull is a solid, so all four cameras are looking at the same rig.
- The seabed and the water are drawn. Nothing computes buoyancy, penetration, punch-through, leg loads or a sea state.

## Usage

```tsx
import { JackupRig } from "@/components/ui/jackup-rig"

<JackupRig behavior="jack" legs={4} />
<JackupRig elevation={0.1} interactive onElevationChange={setElevation} />
```

## Props

| name | type | default | description |
| --- | --- | --- | --- |
| `elevation` | `number` | — | Controlled hull elevation, 0 afloat to 1 jacked right up. Supplying it stops the loop. |
| `behavior` | `"jack" | "preload" | "static"` | `"jack"` | A full move on and off location, or the small settling cycle she does on arrival. |
| `legs` | `3 | 4` | `3` | Legs on the hull, each with its own jacking house and spudcan. |
| `showDerrick` | `boolean` | `true` | The cantilever and the drilling package skidded out over the stern. |
| `interactive / onElevationChange` | `boolean / (elevation: number) => void` | — | Drag or arrow-key the hull up and down its legs. |
| `view` | `"plan" | "front" | "profile" | "iso"` | `"front"` | Where the camera stands. One jack-up, four projections: straight down, straight on, side elevation, or three-quarter from above. |
| `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. |
| `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/jackup-rig.tsx`
