Skip to main content
100%

let's make a face with D3.js

✓ Published1🌍 Public
RRemy-dev
Last edited Jan 13, 2022
Created on Jan 13, 2022

This example renders a cartoon face in SVG using D3.js, with a yellow circular head, two eyes, and eyebrows that animate upward and back down. The code constructs the face by appending circles and rectangles to a group centered on the canvas, then uses `transition().duration()` to create a brief eyebrow-raising motion. A mouth is drawn with D3’s `arc()` generator, specifying inner and outer radii and angular range. The scene is static except for the eyebrow animation, demonstrating basic SVG shape construction and tweened transitions within a React framework.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes