No.201 · 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): Golden hour (the defaults): sky gradient #f6c48a → #f7e7c6, sand #e8a35d deepening to shadow #5a2b19. This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. 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 behavior: Redraws to its container size via ResizeObserver. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.
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.