Based on Extended Position Based Dynamics by Matthias Müller.
Refer to the docs directory to view the papers and source code used in this project.
Demo: https://markeasting.github.io/three/
npm install
- Install dependencies
npm run dev
- Runs the local dev server
npm run build
- Build the project
- XPBD update loop
- XPBD World / body manager
- Rigid bodies
- Body 'sleep' feature
-
applyForce()
-
applyTorque()
- Penetration
- Surface properties: friction & restitution
- Broad phase (AABB)
- Narrow phase (GJK / EPA)
- Convex hull generation
- Contact manifold generation / clipping algorithm
- Broad phase (sorting algorithm)
- Broad phase (spatial subdivision / octree)
- Narrow phase (optimized primitives: spheres, capsules)
- Object pool for Vec3 instances
- Basic constraint
- Mouse picking/dragging
- Calculate constraint force
- Damping
- Swing / twist limits