Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

60aab85945c24317a54564ae8e1ceb6b

Mouse Follower

0 stars1🌍 Public
LLaura Johnson
Last edited Mar 12, 2021
Created on Mar 12, 2021
Forked from Smiley face part 1

A black circle follows the mouse cursor across a blank SVG canvas, centering itself on the pointer's exact coordinates. The visualization demonstrates a simple interactive loop using React's `useState` and `useCallback` hooks to track `clientX` and `clientY` positions from a mouse move event, while D3 v6 handles SVG rendering. The circle has a fixed radius of 30 pixels and starts at the canvas center before responding to user movement.

AI-generated description

A program that follows your mouse with a circle.