Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Smiley Face Part II

Public visualization

Viewing a saved revision (read-only)

8ac4b314b5f84a6f88ea4172dc14d953

Smiley Face Part II

0 stars0🌍 Public
BBugGreen
Last edited Nov 17, 2021
Created on Nov 17, 2021
Forked from HTML Starter

This example renders a smiley face using React and SVG, scaling its size to fill the browser window. The face is centered by translating a group element to the middle of the viewport, with the head radius computed from the window height and a fixed stroke width. Eye positions and radii are defined as constants (eyeOffsetX, eyeOffsetY, eyeRadius) and rendered as two circles. The visualizations uses React's `React.createElement` and `ReactDOM.render` to draw the SVG elements procedurally, adapting the face to any screen dimensions.

AI-generated description

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

See also React Starter.