Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Different color smiley faces

Public visualization

Different color smiley faces

0 stars1🌍 Public
NNita
Last edited May 28, 2020
Created on May 28, 2020

Multiple smiley faces of varied sizes appear in a grid, each with differently colored eyes and a mouth drawn as an arc. The code generates 45 faces using React’s `useState` and `useCallback` hooks, while D3’s `arc()` function computes the mouth path. Each face’s position follows the mouse via an SVG `onMouseMove` handler, and face size, eye radius, and eye fill color are assigned randomly. Rendering uses SVG within React, with the `d3` library imported for arc generation.

AI-generated description

React Starter code.

Comments

Sign in to join the discussion.

MIT Licensed