Skip to main content
100%

Let's make a face with D#.js

✓ Published0🌍 Public
Aakankshaahirwal
Last edited Jan 6, 2020
Created on Jan 6, 2020

This example draws a cartoon face using D3.js v5 with SVG shapes, rendered on a yellow circle with black stroke. The code uses `d3.select` and `d3.arc()` to construct the mouth, while static circles and rectangles form the eyes and eyebrows. A `transition().duration().attr()` chain animates the right eyebrow, moving it upward and back down. The face is centered via SVG group transforms, with dimensions derived from the viewport height and width.

AI-generated description
MIT Licensed

Similar vizzes