Skip to main content
100%

Let's make a face with d3.js

✓ Published1🌍 Public
BBoyan Petrov
Last edited Aug 9, 2020
Created on Aug 9, 2020
Forked from HTML Starter

This example builds a cartoon face from a red circle with a black stroke, two animated eyes, an arc-shaped patch of hair, and a mouth created with d3.arc(). The left and right eyes use chained transition() calls to shift their cx attributes over two seconds each, creating a subtle side-to-side movement. The SVG is centered within a 960×500 viewport, and the face is grouped and translated to the middle of the canvas. The code imports select and arc from the d3 library and uses v5.

AI-generated description
MIT Licensed

Similar vizzes