Hyperspeed
A night highway in perspective with streaks of lights racing both ways. Pure WebGL2, no 3D library.
import { Hyperspeed } from "pleate/effects/hyperspeed";Behind a headline
Faster than the night
Props
- lanes
Lanes in each direction (1 to 4).
numberdefault 3- colors
CSS colors or tokens: outgoing lights, incoming lights and lane markings. Defaults follow the palette.
string[]- speed
Playback speed.
numberdefault 1- scale
Pattern size; above 1 is bigger.
numberdefault 1- interactive
React to the pointer over the parent.
booleandefault true
Accessibility
- Decorative: the canvas is aria-hidden and ignores pointer events, so content on top stays usable.
- Pauses off screen and in hidden tabs; with reduced motion it shows a still frame.
- Fills its parent: give the parent position relative and the background absolute inset-0.