Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
YYibo Zhang
Last edited Jan 7, 2022
Created on Jan 7, 2022
Forked from Smiley Face

A yellow circle follows the mouse cursor across a blank SVG canvas. The visualization directly maps the cursor's client coordinates to the circle's center position, creating an immediate and direct interactive response. Built with React, the application uses the `useState` and `useCallback` hooks to manage and update the mouse position state, while the SVG `onMouseMove` event triggers the state changes. The circle is rendered as an SVG element with a fixed radius, and the code initializes the circle at the center of a 960 by 500 viewport.

AI-generated description

A program that follows your mouse with a circle

MIT Licensed

Similar vizzes