Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
Zzhangwbhi
Last edited Aug 2, 2021
Created on Aug 1, 2021

A yellow circle follows the mouse cursor across a 960 by 500 SVG canvas. The sketch uses React's `useState` to track the pointer's `clientX` and `clientY` coordinates from the `onMouseMove` event, updating the circle's `cx` and `cy` attributes in real time. The example demonstrates a minimal interactive SVG render loop with React 17 and ReactDOM.

AI-generated description

Half way towards a smiley face.

MIT Licensed

Similar vizzes