Skip to main content
100%

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

✓ Published0🌍 Public
JJustin Roberts
Last edited Feb 22, 2023
Created on Feb 22, 2023

This example creates a stylized, cartoon-like face using D3.js v5, drawing features like hair, eyes, ears, nose, and teeth as SVG shapes. The primary animation shows the eyebrows moving upward and then back down over two seconds each way, using chained `transition` calls on the group containing them. The code directly manipulates SVG elements via `d3.select` and `append`, positioning features with explicit `attr` values, and uses the `arc` generator to form the mouth path. The visualization demonstrates fundamental DOM manipulation and animation within a 960 by 500 pixel SVG canvas from `index.html`.

AI-generated description

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

MIT Licensed

Similar vizzes