# Manta

A ray from above, whose travelling wave runs across the span instead of along the body: the wing root is station 0 and the tip is station 1, so a crest leaves the shoulder and arrives at the tip.

> 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/robot-manta.json
```

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

## Notes

- Banking is a roll about the fore-aft axis, so in plan the span foreshortens by its own cosine and one tip rises as the other drops. The yaw comes out of the roll rather than being a second control.
- Plan view is the identity projection. Off-axis the wings are a chain of tubes at the heights the wave actually put them.
- Illustrative, like the rest: no thrust, no added mass, and the animal never leaves the middle of the frame.

## Usage

```tsx
import { RobotManta } from "@/components/ui/robot-manta"

<RobotManta behavior="cruise" />

// Or drive the beat and the roll yourself.
<RobotManta phase={0.4} amplitude={0.7} bank={-0.8} waves={1.1} />
```

## Props

| name | type | default | description |
| --- | --- | --- | --- |
| `view` | `"plan" | "front" | "profile" | "iso"` | `"plan"` | Where the camera stands. One ray, four projections: straight down, straight on, side elevation, or three-quarter from above. |
| `behavior` | `"cruise" | "soar" | "bank" | "static"` | `"cruise"` | What it does when phase is not supplied: a steady beat, wings held, or a long rolling turn. |
| `phase` | `number` | — | Controlled cycle fraction. Supplying it stops the internal clock. |
| `speed` | `number` | `0.55` | Wingbeats per second. |
| `offset` | `number` | `0` | Seconds of offset, so a squadron breaks step. |
| `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. |
| `amplitude` | `number` | — | Peak wing swing, 0–1. Omit and the behavior sets it. |
| `waves` | `number` | `0.85` | Wave crests along the span, clamped to 0.25–3. |
| `bank` | `number` | — | Roll, −1 to port and 1 to starboard. Omit and it banks toward the pointer. |
| `segments` | `number` | `12` | Stations along each wing, clamped to 3–24. |
| `interactive` | `boolean` | `true` | It banks toward the pointer, and a click surges. |
| `onSurge` | `() => void` | — | Fired on the click that starts a surge. |
| `showGround` | `boolean` | `true` | The shadow on the seabed. |
| `label` | `string` | — | Caption underneath the ray. |
| `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/robot-manta.tsx`
