Untitled
✓ Published1🌍 Public
Twenty colored rectangles of random sizes bounce off one another and the edges of an SVG canvas, continuously accelerated by a custom force simulation built with `d3.forceSimulation`. Each particle moves at a constant velocity, with a custom `rectCollide` force handling pairwise collisions via a quadtree, and a `boundedBox` force keeping them inside the frame. Rectangles are draggable with `d3.drag`, which temporarily alters their velocity. The visualization uses D3 v4 with ordinal color scaling and direct SVG manipulation.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed