Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Smiley Face Part II

Public visualization

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.

Comments

Sign in to join the discussion.

MIT Licensed