🌍 Public
Viewing a saved revision (read-only)
f9203d70bde344d3b5cbf1d238a3a7ce
Fork of Let's make a face with D3.js!
This example animates a smiley face built with SVG, showing its eyebrows moving up and down while the rest of the face remains static. It demonstrates fundamental D3.js DOM manipulation by constructing the face from basic shapes—circles for eyes, rectangles for eyebrows, and arcs for the nose and mouth—using a d3 selection and the `arc` helper. The eyebrow motion is driven by chained `transition.duration(0)` calls that instantly shift the group’s transform attribute. The code uses d3 v5 and orchestrates all elements within a centered SVG group.
AI-generated descriptionDemonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.