Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

021efaef4f4a4578bf98d6b5f339787e

Mouse Follower

0 stars1🌍 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.