Ball Bounce
✓ Published0🌍 Public
A circle rests at the center of the screen, and the user can click and drag it with the mouse. Upon release, the ball's velocity is calculated from the drag distance and time, causing it to move and bounce off the window edges. The ball can be grabbed again mid-motion to be thrown anew. The visualization uses D3 v7’s `select`, `timer`, and event handlers on the SVG to manage rendering, with state tracked for position and momentum.
AI-generated descriptionGrab the circle and try to throw it. It will continue to move and bounce of walls. You can then grab it again while it is moving!
MIT Licensed