Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Mouse Follower

0 stars1๐ŸŒ Public
JJohn Kobbeman
Last edited Feb 28, 2021
Created on Feb 28, 2021
Forked from Smiley Face

A yellow-outlined circle tracks the mouse pointer across an SVG canvas, moving smoothly as the cursor travels. The visualization uses React's `useState` and `useCallback` hooks to capture mouse coordinates from the SVG's `onMouseMove` event and update the circle's `cx` and `cy` attributes accordingly. The rendering relies on D3 v6 for SVG manipulation within a React framework, with no data source beyond the user's pointer position.

AI-generated description

A program that follows your mouse with a circle.

Comments

Sign in to join the discussion.

MIT Licensed