Backgrounds
World Map ASCII
A dot-matrix world map whose particles scatter from the cursor.
Install
# WorldMap ASCII needs no npm packagesThen copy 2 files into your project:
- components/registry/world-map-ascii/world-map-ascii.tsx
- hooks/use-animation-loop.ts
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| color | string (hex) | "#a855f7" | Particle color. |
| particleSize | number | 0.7 | Dot radius. |
| density | number | 8 | Particle density — higher packs more particles. |
| mouseRadius | number | 80 | Cursor interaction radius; 0 disables the scatter. |
| drift | number | 0.06 | Idle wobble amplitude. |
What It Demonstrates
- Hover effect
- Visual change when the cursor moves over an element.
- Idle animation
- Subtle motion that plays while an element is just sitting there, waiting to be interacted with.
- Loop
- An animation that repeats, a set number of times or infinitely.
Related Components
Light Rays
Volumetric god-rays from a configurable origin, optionally mouse-following.
Constellation
A constellation network — drifting particles link by proximity, chase and flee the cursor, and glow.
Turing
Gray-Scott reaction-diffusion on the GPU. Two reagents, four terms, and coral, labyrinths and colonies that settle and stop all fall out of the arithmetic — a background that grows rather than loops, and never reaches the same frame twice.
Quicksilver
Molten chrome. Every other shader background emits light; this one reflects a studio that does not exist, synthesised from the surface normal — sharp softbox edges, a conductor's Fresnel wash, thin-film iridescence, and a wake that keeps moving where you dragged.
Mycelium
A slime mould foraging in the dark. Every other field here is a differential equation on a grid; this one is a population — up to a million agents, each carrying a position and a heading, sampling the trail ahead of itself, turning toward whatever smells strongest and laying down more of it as it goes. The veins, the junctions and the slow reorganisation are nowhere in the code.
Contour
A topographic map of terrain that will not hold still. The lines are not drawn, they are found — a height field is sampled onto a grid every frame and marching squares walks it once per altitude, emitting segments wherever the land crosses that height. Nothing here knows what a ridge is; ridges are where the crossings bunch up. The pointer raises a hill the contours have to route around, and because the interval is fixed rather than the line count, that extra altitude produces extra rings instead of restretching the ones already on screen.