No.120 · Backgrounds
Dune Field
Layered sand ridges seen at low sun: crests glow on one side and fall into shadow on the other while wind drifts each layer at its own speed.
The prompt
Written for the variant you picked above: Golden hour
Paint seven layered ridge lines in Canvas 2D, back to front. Each ridge is a sum of three sines whose frequency, phase and drift speed depend on its layer, so each layer moves at its own pace. Fill each with a vertical gradient from the sand colour toward a deep shadow colour with depth, and add a lit rim line. Where the ridge descends steeply to the right, overlay a translucent dark strip so slip faces read as shadow. A radial sun glow sits above the horizon. Pointer x parallax-shifts layers by depth. Cap DPR at 2, pause offscreen, static under reduced motion. Selected variant — Golden hour: Golden hour (the defaults): sky gradient #f6c48a → #f7e7c6, sand #e8a35d deepening to shadow #5a2b19.
Notes
- Interaction
- Move the pointer horizontally to parallax the dunes.
- Motion
- rAF-driven slow sine drift per layer, with pointer parallax.
- Accessibility
- Decorative canvas (aria-hidden); very slow motion; reduced motion draws one still frame.
- Responsive
- Redraws to its container size via ResizeObserver.