Fork of Fork of SVG Fundamentals
β Published0π Public
Falling blocks and circles tumble and bounce inside a rotating rectangular container rendered on an HTML canvas. Matter.js handles the 2D physics simulation, including gravity, collisions, and restitution, while a custom constraint system translates world coordinates into the box's local space to keep bodies within its moving walls. The box itself rotates continuously, creating shifting boundaries that redirect the objects' motion.
AI-generated descriptionMIT Licensed