Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Mouse Follower

0 stars1🌍 Public
EEFezerKW
Last edited Sep 28, 2021
Created on Sep 28, 2021

A circle in an SVG canvas tracks the mouse cursor across the full browser window. The visualization uses React’s `useState` and `useCallback` to update the circle’s center coordinates on every `onMouseMove` event. The D3.js library is imported for its `arc` function, though the rendering itself relies solely on React and SVG elements. The `clientX` and `clientY` properties from the mouse event directly set the circle’s position.

AI-generated description

A program that follows your mouse with a circle.

Comments

Sign in to join the discussion.

MIT Licensed