Skip to main content
100%

Mouse follower

✓ Published0🌍 Public
Aandrotop
Last edited Sep 22, 2021
Created on Sep 22, 2021
Forked from Smiley face 1

A yellow circle follows the mouse cursor across an SVG canvas using React state to track pointer position. The component listens to `onMouseMove` events on the `<svg>` element and updates the circle’s `cx` and `cy` attributes accordingly. It uses React hooks (`useState`, `useCallback`) for state management, while the `d3` library is imported for its `arc`, `line`, and `range` utilities, though only the basic SVG circle rendering is demonstrated here. The initial position is centered at 480×250.

AI-generated description

A program that follows your mouth

MIT Licensed

Similar vizzes