Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
BBun
Last edited Dec 7, 2020
Created on Dec 7, 2020

This example builds a playful face entirely out of circles and lines inside an SVG, with features that wiggle and bounce. Using D3.js v5 and its `d3.forceSimulation` API, the face’s eyes, pupils, and mouth are treated as particles linked by spring-like forces, so they jiggle organically. The code defines the facial geometry through `d3.forceManyBody` and `d3.forceLink`, with the simulation ticking to update element positions each frame. Rendered in a 960×500 SVG canvas, the face emerges purely from code without external data sources.

AI-generated description
MIT Licensed

Similar vizzes