Skip to main content
100%

Fork of Mouse Follower

✓ Published2🌍 Public
Hhukbk
Last edited May 11, 2022
Created on May 14, 2021
Forked from Mouse Follower

A circle follows the mouse cursor within a fixed-size SVG canvas, updating its position in real time. The visualization uses React’s `useState` to track the cursor coordinates and a `useCallback` handler triggered by the SVG’s `onMouseMove` event. The circle’s center (`cx`, `cy`) is bound to the stored mouse position, while the radius remains constant at 30 pixels. The React DOM renders the SVG directly, with the initial position centered at half the canvas dimensions (968×550).

AI-generated description

Kreis soll Maus folgen (Fertig)

MIT Licensed

Similar vizzes