🌍 Public
Viewing a saved revision (read-only)
5dc4983be0b2456097a22106536fb3f2
Moving circle
A moving circle follows the mouse cursor across an SVG canvas, changing to a random RGB color with each click. The visualization uses D3's data join pattern, binding arrays of null values to create and update a single circle and svg element on every state change. Mouse and click event listeners call a setState function that updates the circle's x and y coordinates to the cursor position or assigns a new randomly generated color.
AI-generated description