Skip to main content
100%

Mouse follower

✓ Published2🌍 Public
Llaplantalaplanta
Last edited Jan 20, 2022
Created on Jan 13, 2022

A simple interactive visualization renders an SVG circle that follows the mouse cursor across a 960×500 viewport. The React component tracks the cursor’s `clientX` and `clientY` coordinates through an `onMouseMove` handler, storing them in state via `useState` and updating the circle’s `cx` and `cy` attributes. D3.js v5 and React 16.9 manage the rendering, with the circle starting at the center of the screen. The visualization demonstrates state-driven updates in a React-D3 hybrid, using SVG elements for direct DOM manipulation.

AI-generated description

A program that follows your mouse with a circle

MIT Licensed

Similar vizzes