Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
Ccaptind
Last edited Feb 21, 2023
Created on Feb 21, 2023

A yellow circle follows the mouse cursor within an SVG canvas as the pointer moves. The visualization uses React hooks and event handling, specifically the `useState` and `useCallback` functions, to track the cursor's `clientX` and `clientY` coordinates and update the circle's `cx` and `cy` attributes. The circle is drawn using React's SVG support, with the D3.js `arc` function imported but not used in the visible code. The canvas size is fixed at 960 by 500 pixels with a circle radius of 30.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes