ns-ui / loud

Terrain Erosion Carve

The cursor is a river — dragging across a live topographic map carves a channel into the heightfield, marching-squares isolines reflowing into canyon walls with a faint waterline; release and sediment heals the terrain back over ~6 seconds. At rest the sheet stays alive: contours drift in a slow traveling ripple and sediment specks trickle downhill continuously.

Use when an ambient full-bleed sheet the cursor persistently changes, dragging carving channels into a live heightfield that sediment heals back over about six seconds, so the surface remembers where you have been; pick reveal-ripple-tiles instead when the point is revealing media beneath a grid rather than deforming a generative field, or hero-vortex-street when the trace should drift and decay rather than carve.

Install

npx shadcn add https://design.helpmarq.com/r/terrain-erosion-carve.json
  • terrain
  • topographic
  • cursor
  • canvas
  • marching-squares
  • drag
  • physics
  • ambient

ns-ui / terrain-erosion-carve

DRAG TO CARVE

sediment heals in ~6s

Props

PropTypeDefaultDescription
gridSize?number96heightfield resolution per axis (nodes)
contourStep?number0.08elevation gap between isolines; every 5th index line renders brighter
brushSigma?number28gaussian carve-brush radius (sigma) in screen px
carveRate?number0.9carve rate in elevation units per second at full depth
healTau?number2.2healing time constant in seconds (95% healed ≈ 3·tau)
showReadout?booleantruefont-mono corner readout of cursor grid coords
className?string"h-96"
aria-label?string"Topographic map — drag to carve a river channel"