A real-time, WebAssembly-powered N-body gravitational system simulator built with C++, OpenGL ES 3.0, GLFW, and Emscripten running directly in your browser. Its features include predicitve orbit trails, collision, time controls and body spawning.
| Action | Description |
|---|---|
| Left Drag | Orbit camera |
| Scroll/Pinch | Zoom in/out |
| Shift/Two-Finger Drag | Pan camera target |
| Resize window | Viewport adjusts dynamically |
- Emscripten SDK
makeglmheader library (expected inexternal/glm)
makeThis will compile main.cpp to WebAssembly via emcc and launch your default browser automatically.
To enable the touch emulator (for testing touch input with a mouse on desktop):
make TOUCH_EMULATOR=1To clean:
make clean| Library | License | Usage |
|---|---|---|
| GLM | MIT | Math library for OpenGL |
| TouchEmulator (Hammer.js) | MIT | Desktop touch event emulation for development |
