I’m looking for a physics library to use with Three.js. I thought Ammo.js and Cannon-es were among the popular choices, but after checking GitHub, it seems like they are not actively maintained anymore.
Are there any physics libraries that are currently maintained and work well with Three.js that you would recommend?
They’re probably not actively maintained because they don’t really need to! What they do need is better documentation and some updated examples. Ammo.js especially could use a more modern API.
I would recommend rapier.js just because the docs are so good. It has by far the best documentation I’ve seen for a physics engine, it’s actively maintained, and it’s the go-to choice for r3f with a really nice React wrapper.
Not saying rapier is the only good one, there’s a bunch of others worth checking out. The Phy library has an awesome demo project where you can try different engines, and you can also check the code in the repo.