# Drilling derrick

A mast, a crown, and a travelling block that is reeved rather than positioned: the drum's payout is shared between the strung lines, so mechanical advantage shows up as rope.

> 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/drilling-derrick.json
```

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

## Notes

- Block travel and the reeved falls are solved from a constant rope length. Nothing computes hook load, line tension, rope stretch, sheave efficiency or depth.
- The hole, the string below the floor and the returning mud are illustrated.

## Usage

```tsx
import { DrillingDerrick } from "@/components/ui/drilling-derrick"

<DrillingDerrick behavior="trip" lines={8} />
<DrillingDerrick hoist={0.35} lines={12} interactive onHoistChange={setHoist} />
```

## Props

| name | type | default | description |
| --- | --- | --- | --- |
| `hoist` | `number` | — | Controlled block height, 0 at the floor to 1 at the crown. Stops the loop. |
| `behavior` | `"trip" | "drill" | "static"` | `"trip"` | The whole mast up and back, or a slow feed off the top and a run back up to make a connection. |
| `lines` | `4 | 6 | 8 | 10 | 12` | `6` | Lines strung between the crown and the block. More lines means more drum turns for the same lift. |
| `showString / showRack` | `boolean` | `true` | The string below the floor and the mud return; the racked stands inside the mast. |
| `interactive / onHoistChange` | `boolean / (hoist: number) => void` | — | Drag or arrow-key the block up and down the mast. |
| `view` | `"plan" | "front" | "profile" | "iso"` | `"front"` | Where the camera stands. One derrick, 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/drilling-derrick.tsx`
