Skip to main content
100%

Let's make a face with D3.js!

✓ Published1🌍 Public
IIan Perry
Last edited Jun 17, 2020
Created on Jun 17, 2020
Forked from HTML Starter

This example builds a cartoon face out of SVG shapes using D3.js v5, with a yellow circle for the head, two eyes, rectangular eyebrows, and a mouth drawn with the `d3.arc` path generator. The eyebrows animate upward and back down over two seconds via chained `transition()` calls. All elements are centered using an SVG `<g>` group with a translation transform, and the code imports `select` and `arc` from D3 to manipulate the DOM and generate the mouth path. The face is static except for the looping eyebrow movement.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes