An interactive 3D physics simulation environment powered by WebGPU with real-time gravity, collisions, and dynamic object spawning.
- WebGPU Rendering โ Cutting-edge GPU-accelerated graphics via Three.js WebGPU renderer
- Real-time Physics โ Gravity, collisions, friction, and bounciness powered by cannon-es
- Interactive Spawning โ Click on the ground or press Space to spawn objects
- Multiple Shapes โ Cubes, spheres, and cylinders with randomized colors
- Adjustable Parameters โ Gravity, object scale, and bounciness sliders
- Auto-spawn Mode โ Toggle continuous object rain
- Visual Effects โ Glowing spawn animations, dynamic colored lights, ambient particles
- Sci-fi Aesthetic โ Dark theme with glassmorphism UI and cyan grid floor
A browser with WebGPU support:
- Chrome 113+ (enabled by default)
- Edge 113+ (enabled by default)
- Firefox Nightly (with
dom.webgpu.enabledflag)
Since the app uses ES modules, it needs to be served over HTTP:
# Using npx (no install needed)
npx serve .
# Or Python
python -m http.server 3000
# Or any static file serverThen open http://localhost:3000 in your browser.
| Input | Action |
|---|---|
| ๐ฑ๏ธ Click ground | Spawn object at cursor |
| โจ๏ธ Space | Spawn random object |
| โจ๏ธ R | Reset scene |
| ๐ฑ๏ธ Drag | Orbit camera |
| ๐ฑ๏ธ Scroll | Zoom in/out |
- Three.js (WebGPU renderer) โ 3D rendering
- cannon-es โ Physics engine
- Vanilla HTML/CSS/JS โ Zero build step
MIT