Skip to main content
100%

Fork of Fork of Create a face with d3.js!

✓ Published1🌍 Public
Ppeddubalaji@gmail.com
Last edited Feb 28, 2024
Created on Feb 28, 2024

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 description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes