🌍 Public
Viewing a saved revision (read-only)
824c36a12cea4ba5b20ef01b4204561c
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