Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Face moves with mouse

Public visualization

Face moves with mouse

0 stars1🌍 Public
Aashokganpathi
Last edited May 8, 2021
Created on May 8, 2021
Forked from Laughing Face

A yellow smiley face drawn with SVG elements follows the cursor as it moves across the screen. The mouse position is tracked via React's `useState` and `useCallback` hooks in response to an `onMouseMove` event on the root `<svg>`. The face is composed of reusable React components (`BackgroundCircle`, `Eyes`, `Mouth`, `Nose`) using `d3.arc` for the mouth path. The rendering is entirely SVG-based, with the face's geometry parameterized by props passed from the parent `App` component.

AI-generated description

Halfway through to a smiley face

Comments

Sign in to join the discussion.

MIT Licensed