Mouse Follower that Changes Color
✓ Published1🌍 Public
A D3.js v7 circle of radius 50 follows the mouse cursor, changing its fill color to a random RGB value each time the user clicks. The visualization demonstrates unidirectional data flow from mouse events through a state object that stores the current x, y, and color coordinates. Built with D3's `select` and `join` APIs, it renders an SVG inside the `#app` container, updating the circle's `cx`, `cy`, and `fill` attributes on every state change.
AI-generated descriptionA circle that follows the mouse using unidirectional data flow.
MIT Licensed