Skip to main content
100%

Let's make a face

✓ Published0🌍 Public
Tteohangxanh
Last edited Feb 22, 2022
Created on Feb 16, 2022

This example builds a cartoon face out of scalable vector graphics (SVG) shapes using React and D3. The code draws a yellow circular head, two eyes, a nose, ears, and a mouth using basic SVG elements like circle and path. React handles the component structure, while D3’s arc generator calculates the mouth’s curved shape. The layout is centered on a 960 by 500 canvas, with each facial feature positioned through explicit pixel coordinates and styled with fills, strokes, and stroke widths.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes