Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

3177010eba49422e99f301ee11ab16eb

Mouse Follower

0 stars1🌍 Public
Ccaptind
Last edited Feb 21, 2023
Created on Feb 21, 2023

A yellow circle follows the mouse cursor within an SVG canvas as the pointer moves. The visualization uses React hooks and event handling, specifically the `useState` and `useCallback` functions, to track the cursor's `clientX` and `clientY` coordinates and update the circle's `cx` and `cy` attributes. The circle is drawn using React's SVG support, with the D3.js `arc` function imported but not used in the visible code. The canvas size is fixed at 960 by 500 pixels with a circle radius of 30.

AI-generated description

A program that follows your mouse with a circle.