Fully typed 2D physics engine — modern TypeScript rewrite of Nape
Rigid bodies • Circles, Polygons & Capsules • Constraints • Fluid simulation • Collision callbacks • Spatial queries • Serialization • Web Worker support — tree-shakeable, zero dependencies.
npm install @newkrok/nape-js
Click/drag on the canvas to interact. Pick a demo below.
Measured in your browser right now. Each test runs the physics step()
in a tight loop and reports the median time per step.
Press the button to start.