Skip to main content
100%

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

✓ Published0🌍 Public
Ssaiyogesh9911@gmail.com
Last edited Feb 28, 2024
Created on Feb 28, 2024

This fork of “Let's make a face with D3.js!” builds a yellow smiley face from SVG shapes, including eyes, eyebrows, a mouth, nose, ears, and hair. D3.js v5 selections append circles, rectangles, paths, and ellipses to an SVG canvas, while the `d3.arc` generator creates the curved mouth. A two-stage transition animates the eyebrow group’s vertical position, moving the eyebrows up and down over two seconds per cycle using `transition.attr`. The face is centered via a translated `<g>` element, and the code relies on D3’s `select` and `arc` imports.

AI-generated description

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

MIT Licensed

Similar vizzes