Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Smiley Face Part II

Public visualization

Viewing a saved revision (read-only)

ae5c52985ad642b5a0483239ae4afe92

Fork of Smiley Face Part II

0 stars0🌍 Public
Aabhashdiu
Last edited Oct 3, 2022
Created on Oct 3, 2022

This example shows a smiley face rendered as a large yellow circle with two eyes and a mouth, all positioned relative to the browser window’s center and sized based on its dimensions. Built with React and D3 v5, it uses D3’s `arc` generator to create the mouth’s curved path, while SVG circles handle the face and eyes. The drawing scales dynamically with the viewport, using `window.innerWidth` and `window.innerHeight` to set the canvas size.

AI-generated description

Smiley face implementation with React.