# Oil tanker

The one machine in the set whose ground plane cuts through it. Cargo moves the hull down through the waterline, carrying the boot top, the draft marks and the load line under 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/oil-tanker.json
```

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

## Notes

- Heave and trim are a rigid motion applied in the hull's own plane, so every camera sees the same ship rather than a rotated picture of one.
- The draft is a drawn proportion of a drawn hull. Nothing solves displacement, buoyancy, trim, stability, tonnage or a hull form.

## Usage

```tsx
import { OilTanker } from "@/components/ui/oil-tanker"

<OilTanker behavior="laden" tanks={8} />
<OilTanker cargo={0.2} behavior="swell" interactive onCargoChange={setCargo} />
```

## Props

| name | type | default | description |
| --- | --- | --- | --- |
| `cargo` | `number` | — | Controlled cargo, 0 in ballast to 1 fully laden. Supplying it stops the loop. |
| `behavior` | `"laden" | "swell" | "static"` | `"laden"` | A whole port call, or a held cargo with the sea doing the moving. |
| `tanks` | `number` | `6` | Cargo tanks, which is also the hatches drawn along the deck. Clamped to 2–10. |
| `showManifold` | `boolean` | `true` | The midship manifold, its hose over the side, and the cargo gauges. |
| `interactive / onCargoChange` | `boolean / (cargo: number) => void` | — | Drag or arrow-key her down through the waterline. |
| `view` | `"plan" | "front" | "profile" | "iso"` | `"profile"` | Where the camera stands. One tanker, 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/oil-tanker.tsx`
