Skip to main content
100%

Fork of Create a face with d3.js!

✓ Published0🌍 Public
LLavinaThorat
Last edited Oct 3, 2023
Created on Oct 3, 2023

This example builds a cartoon face out of basic SVG shapes—a yellow circle for the head, circles for eyes, rectangles for eyebrows, and a d3.arc-generated path for the mouth. The code uses d3-selection to append elements and d3-transition to animate the eyebrows upward and back down over a two-second cycle. The face is centered within a 960×500 SVG canvas, with the d3 library loaded via UNPKG.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes