Shipped this project!
I built a browser-based gravity simulator that let users create cube and sphere objects, tune gravity and time scale, drag objects on a canvas, and watch collisions, trails, and velocity vectors update in real time. I organized the app around a state-driven simulationStore in script.js, which kept rendering, physics, and UI controls synchronized through requestAnimationFrame and reusable object patching. The hardest part was keeping the interaction model responsive while preserving stable physics, so I added broad-phase collision checks, NaN recovery, object limits, and keyboard and touch support to keep the simulation usable as it grew. I also tightened the interface in index.html and styles.css with clear labels, a help modal, accessibility attributes, and a responsive layout so the canvas and side controls worked across screen sizes. The project ended up as a focused physics playground with a cleaner architecture, stronger UX, and room for save/load and preset features next.