Skip to main content
100%

Smiley Face Part 1

✓ Published1🌍 Public
DDeborah Ong
Last edited Apr 1, 2021
Created on Mar 30, 2021
Forked from Hello HTML

This example builds the first stage of a smiley face using React components in an SVG, with D3’s `arc` generator shaping the mouth. It renders a yellow background circle, two eyes positioned via offsets, and a curved mouth path, all centered in a fixed 960×500 viewport. The code relies on D3 v6 for the arc’s inner and outer radii and angle extents, while React handles the componentized structure with named exports. The data flow is purely parametic, with radii and offsets passed as props, and no external dataset is used.

AI-generated description

Halfway towards a smiley face.

MIT Licensed

Similar vizzes