Skip to main content
100%

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

✓ Published1🌍 Public
Zzhangwbhi
Last edited Aug 1, 2021
Created on Aug 1, 2021

This example shows a yellow smiley face composed of a circular background, two eyes, and a mouth, rendered as SVG shapes. The face is drawn declaratively, using React components to wrap each visual element, and positioned at the center of the canvas. The code relies on React 17 and d3.v7 specifically the `d3.arc` API, applied through the `Mouth` component to generate the mouth path. The facial features are parameterized, with the background circle, eyes, and mouth each receiving explicit coordinates and dimensions as props, resulting in a static, programmatically constructed portrait.

AI-generated description

Half way towards a smiley face.

MIT Licensed

Similar vizzes