Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Mouse Follower

0 stars1🌍 Public
Jjanneprice
Last edited Mar 23, 2022
Created on Mar 23, 2022

A green circle tracks the cursor’s movement across an SVG canvas. The visualization uses React’s `useState` and `useCallback` to update the circle’s `cx` and `cy` attributes from the `onMouseMove` event’s `clientX` and `clientY` coordinates. The 960×500 SVG viewport is rendered via ReactDOM, with the circle starting at the canvas center.

AI-generated description

A program that follows your mouse.

Comments

Sign in to join the discussion.

MIT Licensed