🌍 Public
Viewing a saved revision (read-only)
aede1b492a8d481caba03b318dc5e5c3
Fork of Mouse Follower (some experiments)
A circle follows the mouse cursor within a full-window SVG canvas. The example demonstrates unidirectional data flow in React, where the mouse position is the data. The circle’s center coordinates are set from the current state, initialized to the window’s center. The code uses D3’s `select` API to manage the SVG and circle elements, and RDP’s `viz` and `setState` functions to handle rendering and state updates in response to `mousemove` events.
AI-generated descriptionA circle that follows the mouse using unidirectional data flow. See also Mouse Follower with React.