Skip to main content
100%

Lets make a Face with d3.js

✓ Published2🌍 Public
VVamsiYandapalli
Last edited Dec 3, 2021
Created on Dec 2, 2021

This example uses D3.js to draw a simple cartoon face in SVG, centered within a 960×500 viewport. The face consists of a yellow circle with a black stroke, two eyes, animated eyebrows, and a mouth arc created with d3.arc. The eyebrows and mouth use chained transitions to repeatedly move and change fill color, creating a looping animation. All shapes are appended to a group translated to the canvas center, with fixed pixel offsets for eye spacing and eyebrow dimensions.

AI-generated description

Half way towards a smiley face.

MIT Licensed

Similar vizzes