# Cat

The one machine here whose leg roots are carried by a solved spine. The shoulder is joint 0 of the back and the hip is its last joint, so arching the back moves both and the four solved legs have to answer for 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/robot-cat.json
```

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

## Notes

- The back is solveSpine in the sagittal plane, shoulder at s=0 and pelvis at s=1. Its steady turn is the arch and its travelling wave is the bound, so the two leg roots are solver output rather than fixed points on a box.
- Femur and tibia are solved to the hock and their lengths hold exactly; the metatarsus below it is carried at an angle that opens with the crouch. That is how the one free parameter of a three-link hind limb is spent, and it is a rule rather than a solve.
- The ears, whiskers and the tail's banding are drawn, not solved. Illustrative trajectories throughout: no balance, no ground reaction, no righting reflex, and the animal never travels across the frame.

## Usage

```tsx
import { RobotCat } from "@/components/ui/robot-cat"

<RobotCat behavior="prowl" />

// Or pose the back, the legs and the tail yourself.
<RobotCat arch={0.8} crouch={0.2} tail={0.9} ears={-1} />
```

## Props

| name | type | default | description |
| --- | --- | --- | --- |
| `view` | `"plan" | "front" | "profile" | "iso"` | `"profile"` | Where the camera stands. One animal, four projections: straight down, straight on, side elevation, or three-quarter from above. |
| `behavior` | `"prowl" | "pounce" | "arch" | "sit" | "static"` | `"prowl"` | What it does when phase is not supplied: stalk on a lateral-sequence walk, run the whole pounce, hold the startle arch, or sit on its haunches. |
| `phase` | `number` | — | Controlled cycle fraction. Supplying it stops the internal clock. |
| `speed` | `number` | `0.55` | Cycles per second: one stride prowling, one pounce pouncing. |
| `offset` | `number` | `0` | Seconds of offset, so a litter of them 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. |
| `arch` | `number` | — | Back curvature, −1 hollowed into the stretch to 1 arched. Omit and the behavior sets it. It moves the shoulder and the hip, not just the outline. |
| `crouch` | `number` | — | Leg fold, 0 standing tall to 1 flattened. Omit and the behavior decides. |
| `tail` | `number` | — | Tail carriage, −1 tucked under to 1 straight up. Omit and the behavior decides. |
| `ears` | `number` | — | Ears, −1 flat back to 1 pricked forward. Omit and they prick at the pointer. |
| `gaze` | `number` | — | Head and eye aim, −1..1. Omit and it follows the pointer. |
| `interactive` | `boolean` | `true` | The head, ears and eyes track the pointer, and a click pounces. |
| `onPounce` | `() => void` | — | Fired on the click that pounces. |
| `showGround` | `boolean` | `true` | The ground line and the shadow, which shrinks as it leaves the floor. |
| `showContacts` | `boolean` | `false` | Mark the paws carrying weight. |
| `label` | `string` | — | Caption underneath the animal. |
| `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-cat.tsx`
