Animated Background With Contour Lines
ProFull-bleed WebGL topographic background with derivative-antialiased iso-lines cut through a domain-warped elevation field, heavier index contours every fifth level, and a pointer-tracked hill that spreads the rings apart, built on Three.js with survey-ink dark and paper light palettes.
When to use Animated Background With Contour Lines
The only background in this category drawn in line rather than in fill, which is the whole reason to reach for it. A map surface is mostly empty by construction, so a paragraph set on top of it keeps its contrast instead of fighting a brightness that moves underneath. Reach for it on a pricing page, a docs landing, a long marketing section: anywhere the section has more than one sentence in it and the other three would make that sentence tiring to read.
Line weight is measured against the slope of the field itself, so a stroke holds the same pixel width on a steep gradient and on a plateau, and it survives a retina display without thinning out. Two knobs decide the whole character. Raise `lines` for a dense survey chart, drop it toward eight for a few long calm curves. And `indexEvery` controls the heavier ring, which is what stops the pattern reading as wallpaper. The cursor raises a real hill in the field rather than lighting one up, so the contours around it move apart, and it settles back flat when the pointer leaves.
Block details
- Category
- Motion
- Renders
- WebGL canvas. Compiles a shader before the first frame
- Theme
- Follows the site theme in light and dark
- Responsive
- Mobile, tablet and desktop breakpoints are already set
- Dependencies
@react-three/fiberclsxnext-themestailwind-mergethree- Source
- 590 lines, 20 KB in one file
- Install
wensity add animated-background-with-contour-lines --type block- Stack
- React, Next.js, TypeScript and Tailwind CSS v4
- Licence
- Included with Wensity Pro. The CLI copies the file into your repository and you own it from there
- Tags
- webgl, three.js, shader, contour, topographic, lines, light, dark, background
- Last updated

