Hero Templates

Warp Run

A star-streak tunnel rendered as velocity-stretched lines; the pointer steers, dragging banks the ship.

Install

bun add ogl

Then copy 2 files into your project:

  • components/registry/warp-run/warp-run.tsx
  • hooks/use-animation-loop.ts

Props

PropTypeDefaultDescription
density"150" | "300" | "400" | "700""700"Streak count, as discrete steps — each value rebuilds the line buffer.
streakColorstring (hex)"#e9d5ff"Cruising streak color.
accentColorstring (hex)"#67e8f9"Fast-streak burn color.
backgroundColorstring (hex)"#030308"Tunnel void.
speednumber0.2Forward throttle.
streakLengthnumber0.1Motion-blur stretch per streak.
steernumber0.6How hard the pointer bends the tunnel.
rollOnDragbooleantrueBank (roll) while orbit-dragging.

What It Demonstrates

Velocity
How fast and in which direction an element is moving. A spring carries it into the next animation when interrupted, so a flicked element keeps its speed.
Momentum
Motion that carries velocity, especially after a drag or interruption.
Drag
Moving an element by grabbing it, often with momentum when released.
Loop
An animation that repeats, a set number of times or infinitely.
Hardware acceleration
Animating transform and opacity lets the GPU keep motion smooth.

Related Components

Appears In