Skip to main content
100%

face

✓ Published0🌍 Public
JJyotirmayi-max
Last edited May 17, 2021
Created on May 17, 2021

This example shows a smiling face whose eyebrows animate up and down in a looping motion. The face is drawn entirely with SVG shapes, including a circle for the head, two circles for eyes, rectangles for eyebrows, and a path generated using the d3.arc function for the mouth. The animation uses D3 v5’s chained transition method with a 2000-millisecond duration to repeatedly translate the eyebrow group between two vertical positions. The code demonstrates fundamental DOM manipulation by selecting the SVG element and appending groups and shapes to build the composition, with the face centered dynamically using the viewport dimensions.

AI-generated description

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

MIT Licensed

Similar vizzes