Skip to main content
100%

Homework3_mousefollower

✓ Published0🌍 Public
Hhuashe418
Last edited Mar 17, 2022
Created on Mar 16, 2022

A circle follows the mouse cursor across an SVG canvas, updating its center position in real time as the pointer moves. The visualization uses React's `useState` and `useCallback` hooks to track mouse coordinates via an `onMouseMove` event handler on the SVG element. The circle is rendered as an SVG `<circle>` element with a fixed radius, while the component imports the `arc` function from D3 v5, though it is not used in the displayed logic. The initial circle position is centered at (480, 250) on a 960×500 canvas.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes