07.21 · Ambient & Background
Topographic Lines
Lines like those on a hiking map slowly bend and drift. Best for outdoor brands.
Watch it
It moves by itself. Pause it to look closely, or turn on slow motion to see each part of the movement.
Inside, the shading shows the hidden hills, lighter where higher, and each line joins one height, as on a hiking map. Big hills and small bumps drift different ways, so the lines bend.
Hills only slides past in one piece, like a moving picture. Hills and bumps adds small bumps drifting the other way, so over a few seconds its hills swell, sink and change shape.
Try it
Change a setting and see the difference as it moves.
Line spacing
How much the height changes from one line to the next.
Speed
How fast the hills swell and drift.
Color
The color of the lines.
Copy the prompt
Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.
Add a topographic lines background to [the section you want it behind]. Build a smooth, hilly height map from layered noise and draw its contour lines on a canvas: sample the height on a grid, and in each grid square join the points where the height crosses each level, so every line follows one height, as on a hiking map. Make every fifth line bolder when the settings include it. Shift the noise slowly by elapsed time so the hills swell, shrink and drift, and redraw each frame. Sample a coarser grid on phones. If the visitor has reduced motion turned on, show the lines still. Match the settings listed below.
Your settings
Replace the words in brackets with your own element. Your settings are added at the end.
Free and open source. If this helped, a star on GitHub helps other people find it.
Star on GitHubWhat it is
The full explanation is in README.md.