Skip to main content
100%

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

✓ Published0🌍 Public
SSiva Srinivasa Reddy Yakkanti
Last edited Feb 12, 2025
Created on Feb 12, 2025

A yellow smiley face drawn with SVG circles, lines, and a quadratic path renders in a 500×500 viewport, with its eyebrows, mouth, nose, and face color all animating independently. The D3.js v5 code selects the root `svg` element and appends shapes directly, then uses chained `transition()` calls to move eyebrows and nose, remap the mouth path, blink eyes via radius changes, and cycle face fill colors through a fixed palette. A recursive `on('end')` callback drives each looping animation, with eye blinks triggered by `setTimeout` for irregular timing.

AI-generated description

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

MIT Licensed

Similar vizzes