Contour Sheet
Web (React)
A WebGL contour map drawn like a survey sheet: ink contours on paper, with every fifth index line in the theme primary.
A WebGL contour map drawn like a survey sheet: ink contours on paper, with every fifth index line in the theme primary. It fills its positioned parent, follows the active theme and palette in light and dark mode, pauses when off screen and renders a still frame when the user prefers reduced motion.
Installation
CLI
npx @modus-ui/cli add contour-sheetManual
- Copy the code from the component tab.
- Create a file at
components/ui/contour-sheet.tsx. - Paste the code.
Usage
tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
speed | number | 0.7 | Animation speed multiplier (0–3). |
length | number | 0.8 | Length / reach multiplier (0.35–2.5). |
density | number | 1.4 | Contour band count multiplier (0.25–2.5). |
opacity | number | 1 | Opacity of the effect layer (0.05–1). |
hue | number | 0 | Hue rotation in degrees applied to the final frame. |
saturation | number | 1 | Saturation multiplier applied to the final frame. |
brightness | number | 1 | Brightness multiplier applied to the final frame. |
backgroundColor | string | theme background | Paper colour. |
lineColor | string | theme foreground | Contour ink. |
accentColor | string | theme primary | Colour of every fifth (index) contour. |
Comments