Skip to main content
100%

Mouse Follower

✓ Published210🌍 Public
CCurran Kelleher
Last edited May 19, 2020
Created on Aug 29, 2019

A circle follows the mouse cursor within an SVG canvas. The visualization uses React's `useState` and `useCallback` hooks to track the cursor's `clientX` and `clientY` coordinates from the SVG's `onMouseMove` event, updating the circle's `cx` and `cy` attributes in real time. The app renders through ReactDOM, with the circle's radius set to 30 pixels on a 960 by 500 canvas.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes