Skip to main content
100%

Let's make a face with D3.js

✓ Published1🌍 Public
PPiotrekW2
Last edited Feb 19, 2019
Created on Feb 19, 2019

A yellow face with eyes and eyebrows is drawn in SVG using D3.js. The eyebrows animate up and down through chained `transition` and `duration` calls, while the mouth alternates between a frown and a smile using `setTimeout` to invoke a custom `mouthFunction` that redraws an arc path via D3's `arc` generator. The code uses `select`, `append`, and `attr` to build the face from primitive shapes, and `exit` and `remove` to replace the mouth path.

AI-generated description
MIT Licensed

Similar vizzes