# Kicker

A swing leg solved to an ankle path that passes through the ball, and a drag-free parabola that starts where the strike happened. Whether it is good is read off the plot.

> 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/gridiron-kicker.json
```

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

## Notes

- The launch height is the height of the strike on the swing path, so a punt starts where the ball was dropped and a placement starts off the turf. Different trajectory, same solver.
- CLEARS or SHORT is the ball's height where the bar is, against the height of the bar. Nothing declares the result.
- Two scales on purpose: the machine at machine scale, and the flight above it at field scale with the span written on the panel.
- The parabola is drag-free. A real ball does not go this far and does not hang this long.

## Usage

```tsx
import { GridironKicker } from "@/components/ui/gridiron-kicker"

<GridironKicker kick="place" distance={38} />

// Controlled, or a punt with its own hang time.
<GridironKicker kick="punt" swing={0.5} power={1} />
<GridironKicker interactive onSwingChange={setSwing} />
```

## Props

| name | type | default | description |
| --- | --- | --- | --- |
| `view` | `"plan" | "front" | "profile" | "iso"` | `"profile"` | Where the camera stands. One machine, four projections: straight down, straight on, side elevation, or three-quarter from above. |
| `swing` | `number` | — | Controlled: 0 cocked, 0.5 at contact, 1 through the follow-through. Supplying it stops the loop. |
| `behavior` | `"kick" | "approach" | "set" | "static"` | `"kick"` | What it does when swing is not supplied. |
| `kick` | `"place" | "punt" | "kickoff"` | `"place"` | A punt is struck from the hands and much higher, which is a different trajectory rather than a different number. |
| `power` | `number` | `0.85` | How hard, 0 to 1. Scales the launch speed the kick style starts from. |
| `angle` | `number` | — | Launch angle in degrees. Omit and the kick style picks one. |
| `distance` | `number` | `35` | Distance to the uprights, in yards. The bar is at ten feet, and clearing it is computed. |
| `mask` | `"cage" | "bar" | "shield"` | `"bar"` | Facemask style. |
| `number` | `string` | `""` | Two characters on the chest plate. |
| `showPlot` | `boolean` | `true` | Draw the flight plot above the machine. It is at field scale, and the panel says how many yards it spans. |
| `speed` | `number` | `0.4` | Cycles per second. |
| `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. |
| `offset` | `number` | `0` | Seconds of offset. |
| `interactive` | `boolean` | `false` | Drag across to work the swing by hand. |
| `onSwingChange` | `(swing: number) => void` | — | How far through the swing, throughout a drag or a key press. |
| `showGround` | `boolean` | `true` | Draw the contact shadow. |
| `label` | `string` | — | Caption below the readout. |
| `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/gridiron-kicker.tsx`
