Skip to main content
Public

Share visualization

Loading preview…

Fork of Smiley Face Part II

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Fork of Smiley Face Part II

0
TToonysg
Last edited Dec 22, 2021
Created on Dec 22, 2021

The example renders a static smiley face composed of SVG circles and an arc-based mouth, built from reusable React components (Face, Eyes, Mouth, BackgroundCircle). It visualizes a fixed facial geometry with yellow background, black-outlined eyes, and white highlights. The code uses D3's `arc()` generator to construct the mouth path and React state to track mouse position, which draws an additional black circle on screen that follows cursor movement. The visualization demonstrates component composition and event handling in React combined with D3 shape utilities, though the face itself does not react to user interaction.

AI-generated description

An actual smiley face

Comments

Sign in to join the discussion.

MIT Licensed