🌍 Public
Viewing a saved revision (read-only)
3c6d78ddad7c4e8d8742e803547333f0
Let's make a face with D3.js!
This example demonstrates how to construct a simple smiley face from SVG shapes and animate its eyebrows using D3.js. The face is built with a yellow circle, two dark eyes, and a mouth drawn as an arc path, all grouped and positioned within an SVG canvas. A D3 transition with a two-second duration repeatedly moves the eyebrows up and down between two y-offsets, creating a subtle bobbing expression. The code relies on the `select`, `append`, `attr`, and `transition` APIs to manipulate the DOM directly.
AI-generated descriptionDemonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.