Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

e188f229fe3042ca9450da76911a670c

Mouse Follower

0 stars1🌍 Public
DDusty
Last edited Jul 22, 2021
Created on Jul 21, 2021
Forked from Fork of Hello HTML

A circle follows the mouse cursor across an SVG canvas. React state tracks the pointer position, updating on every `mousemove` event, and re-renders the circle's `cx` and `cy` coordinates accordingly. The example uses React 17 with hooks (`useState`, `useCallback`) and renders through `ReactDOM`. D3 v7 is loaded but not directly used. The SVG has a fixed width of 960 pixels and height of 560 pixels, with the circle initially centered at the canvas midpoint.

AI-generated description

A program that follows your mouse with a circle.