Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

MouthFollower

Public visualization

Viewing a saved revision (read-only)

6d32c48eef3b45299c4e3ae5f222fe16

MouthFollower

0 stars1🌍 Public
Rrekabbnad
Last edited Jun 15, 2022
Created on Jun 14, 2022

A React application renders a single SVG circle that follows the mouse cursor across the viewport. It uses React's `useState` and `useCallback` hooks to track pointer coordinates from the SVG `onMouseMove` event, updating the circle's `cx` and `cy` attributes in real time. The SVG canvas is 960 by 500 pixels, with the circle initially centered and a radius of 30. The code imports React and ReactDOM, relying on React's declarative state updates to re-render the circle at new positions without additional data sources.

AI-generated description

a program that follows your mouse with a circle.