🌍 Public
Viewing a saved revision (read-only)
54de7f5a03b6401aa03597b02e4ba202
Smiley Face Part I - lisarnjs
This example renders a smiley face using React and D3’s `arc` generator, drawing SVG shapes onto a 960×500 canvas. A pink circle forms the head, with two small black circles for eyes and a thick, semi-circular mouth created via the `arc` path’s inner and outer radii. The code computes the head radius from the viewport height and stroke width, then positions the facial features relative to a centered `<g>` transform. It uses React 17 for component structure and `d3.arc` for path generation, all rendered as SVG elements.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.