Fork of Fork of Create a face with d3.js!
✓ Published1🌍 Public
This example animates a sunrise scene built with D3 v7, showing a sun rising over mountains while the sky transitions from light blue to orange. The visualization renders SVG shapes—a sky rectangle, a sun with radiating spikes, and three triangular mountains—using D3 selections and attribute setters. Animation is driven by `requestAnimationFrame`, updating the sun’s position and interpolating the sky color via `d3.interpolate`. The code imports D3 from UNPKG and demonstrates local ES6 module usage, though the script is loaded directly. The scene focuses on simple geometric composition and smooth color blending rather than data-driven elements.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed