Skip to main content
100%

make a face with d3.js

✓ Published0🌍 Public
Kkrishv2
Last edited Jun 16, 2020
Created on Jun 16, 2020

A smiling face drawn with basic SVG shapes animates its eyebrows in a looping motion. The example builds a yellow circle for the face, adds two black eyes and a mouth, then runs a repeating transition that moves the eyebrows upward and back down. It uses D3 v5 selections, the `arc()` generator for the mouth path, and chained `transition().duration()` calls to create the animation. The code constructs the layout relative to the SVG’s center and uses the `translate` attribute for positioning.

AI-generated description
MIT Licensed

Similar vizzes