Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Lets make a face with D3.js!

Public visualization

Lets make a face with D3.js!

2 stars3🌍 Public
Ddanhuijia
Last edited Jan 10, 2020
Created on Jan 10, 2020

This example presents a simple, animated face built entirely with D3.js v5 in a React framework. It shows how to construct facial features—eyes, eyebrows, and a mouth—from basic SVG shapes like circles, rectangles, and an arc path, all positioned within an SVG canvas. The code uses D3’s `select`, `arc`, and `transition` APIs to draw the elements and animate the eyebrows repeatedly up and down. The face is centered via a group translation, with eye spacing and brow offsets controlled by constants.

AI-generated description

A bare minimum HTML page.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed