Skip to main content
100%

MouseFollower

✓ Published1🌍 Public
Aadam
Last edited Aug 23, 2021
Created on Aug 23, 2021
Forked from Hello HTML

A circle follows the mouse cursor across an SVG canvas in real time. The React component tracks pointer coordinates through the SVG `onMouseMove` event handler, updating the circle’s `cx` and `cy` attributes. Using React hooks like `useState` and `useCallback`, the app re-renders only on cursor movement, while D3 v5 is loaded but unused in this minimal interaction. The initial mouse position is centered at (480, 250) within a 960 by 500 viewport, with the circle’s radius set to 30 pixels.

AI-generated description

A program tha follows your mouse with a circle

MIT Licensed

Similar vizzes