Skip to main content
100%

BA 401 Namrata Kumari

✓ Published0🌍 Public
Nnamratakumari76
Last edited May 7, 2021
Created on Apr 29, 2021

A smiley face rendered in SVG uses D3.js to animate its eyebrows in a looping up-and-down motion. The face consists of yellow circular head, black eyes, a straight mouth line, and rectangular eyebrows, all constructed with D3 selections and SVG elements. The eyebrow movement is achieved through chained `transition().duration()` calls that alternate the vertical position of a group containing both rectangles. The animation runs once per page load, with the code importing `select` and `arc` from the D3 library.

AI-generated description

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

MIT Licensed

Similar vizzes