Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Let's make a face with D3.js

Public visualization

Fork of Let's make a face with D3.js

0 stars0🌍 Public
TTejaswicmandava
Last edited Feb 25, 2023
Created on Feb 25, 2023

This example shows a simple animated face built with SVG, featuring yellow circular head, white eyes with black pupils, and a mouth drawn as an arc path. The code uses d3-selection to append elements and d3-shape’s `arc` generator to create the mouth. Eyebrows are rectangles that animate by chaining `transition().duration(2000)` calls, moving their group up and down via `attr('transform')`. The face is centered using a `g` element translated to the SVG’s midpoint, with coordinates derived from the SVG’s height and width attributes.

AI-generated description

An example including some commonly used features of SVG.

Comments

Sign in to join the discussion.

MIT Licensed