Skip to main content
100%

Fork of Fork of Fork of Let's Make a Face Part I

✓ Published0🌍 Public
RRubanda
Last edited Sep 27, 2022
Created on Sep 27, 2022

This example shows a stylized, smiling face built from layered SVG shapes, with a gradient-filled circular background, asymmetric eyes, an arc-based mouth, and teeth drawn from lines and arcs. The face is assembled from reusable React components—BackgroundCircle, Eyes, Mouth, Teeth, and FaceContainer—whose positions and sizes are controlled by numerical props passed from a central App component. The code uses React 18 for rendering, d3 7's `arc()` helper to generate the mouth and teeth paths, and SVG `linearGradient` for the green-to-yellow fill. The face is centered in a 960×500 viewport using explicit `centerX` and `centerY` coordinates.

AI-generated description

Half way towards a smiley face.

MIT Licensed

Similar vizzes