Skip to main content
100%

Face moves with mouse

✓ Published1🌍 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

MIT Licensed

Similar vizzes