Fork of Mouse Follower edited
✓ Published1🌍 Public
A circle, rectangle, and text label all follow the mouse cursor across the screen, while a separate set of draggable circles is rendered using D3's data join and drag behavior. Clicking anywhere on the SVG appends a new circle with a random radius from the `d3.range` array, colored via `d3.schemePastel1`. The code uses D3 v7 selections and event handlers (`svg.on("mousemove")`) to update SVG attributes (`cx`, `cy`, `x`, `y`) in real time, with `d3.drag()` enabling interactive circle repositioning.
AI-generated descriptionA circle that follows the mouse.
MIT Licensed