Skip to main content
100%

Fork of Let's make a face with D3.js!

✓ Published0🌍 Public
Aaanawaz
Last edited Jan 22, 2021
Created on Jan 21, 2021

A yellow smiley face with animated eyebrows demonstrates basic D3.js DOM manipulation. The face is drawn entirely with SVG primitives—a circle for the head, smaller circles for the eyes, rectangles for the eyebrows, and a path generated by `d3.arc` for the mouth. Using `d3.transition` with a two-second duration, the eyebrow group repeatedly shifts vertically, creating a bobbing motion. The code leverages D3 selections and attribute setting to build the static facial features, then applies chained transitions to animate the eyebrows independently of the rest of the face.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

MIT Licensed

Similar vizzes