Run real-time physics benchmarks in your browser. Compare nape-js against Matter.js, Planck.js, and Rapier (WASM) on identical scenarios. All tests run client-side — results reflect your hardware.
Performance is only one dimension. Here is what each engine supports:
| Feature | nape-js | Matter.js | Planck.js | Rapier |
|---|---|---|---|---|
| CCD (tunneling prevention) | ✓ | ✗ | ✗ | ✓ |
| Fluid simulation (buoyancy) | ✓ Unique | ✗ | ✗ | ✗ |
| Full TypeScript (strict) | ✓ | ✗ DT | ✗ JS | ✓ WASM |
| Serialization (JSON+Binary) | ✓ | ✗ | ✗ | ✓ Binary |
| Capsule shape (native) | ✓ | ✗ | ✗ | ✓ |
| Sub-stepping solver | ✓ | ✗ | ✗ | ✓ |
| Bundle size | ~87 KB (16 KB gz) | ~82 KB | ~290 KB | ~1.6 MB (WASM) |
| Zero dependencies | ✓ | ✓ | ✓ | ✗ WASM |
step(1/60) is called repeatedly and timed with
performance.now(). Results show the median step time (ms) to
eliminate GC spikes. Lower is better.