Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

fc8b88d4d9944f9b8bf1a260c956dbe9

Mouse Follower

0 stars1🌍 Public
JJakub
Last edited Dec 9, 2021
Created on Dec 9, 2021
Forked from Smiley Face Part I

A single circle follows the mouse cursor across an SVG canvas, updating its position in real time. The visualization demonstrates React’s state management and event handling, using the `useState` hook to track cursor coordinates and the `onMouseMove` event to update them. The circle’s center is bound to the `mousePosition` state, and its radius is fixed at 30 pixels. The code renders the scene with React and ReactDOM, while D3 is loaded but not explicitly used in the visible logic.

AI-generated description