Viewing a saved revision (read-only)
df8675ed93cc4a0e8c9d7f00a85e46b9
Fork of Let's make a face with
This example uses D3.js v5 to construct an animated smiley face directly in SVG. The code builds the face from primitive shapes—a blue circle for the head, two black circles for eyes, and a small arc path for the mouth—while defining the eyebrows as rectangles within a group. The eyebrows animate by automatically transitioning the group’s transform attribute upward and then back down, creating a continuous raising and lowering motion. The visualization demonstrates fundamental DOM manipulation, using D3’s selection, attribute, and transition methods to choreograph a simple, playful animation.
AI-generated descriptionDemonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.