I thought it will be easy
The goalwas to update ammo.js in Physi.js plugin that is a complete physics for Three.js
Some more features why I chose it as a physics library for WhitestormJS framework :
- Web Workers . I found it very useful thing for large calculations as physics and rendering does. It works well, because Web Workers provides mutithreading and it is possible to move your calculations in two different threads that will work independently from each other.
- It’s very easy. As I said before, it is a physics plugin for Three.js . It means that you can use it only with Three.js and nothing else. But this is also a good part, because it will be much easier in usage than Oimo.js or Cannon.js that both can be used with Three.js too.
- Fast and powerfull . Physi.js is just a wrapper around Ammo.js and Three.js. It gets all its power from Ammo.js (to be correct — Bullet Physics). Ammo.js (minified version) weight is more than 1.75Mb while other physics libraries are about 100Kb which are ~18 times smaller. Every kilobyte in web development is on balance. Large libraries make your site slow, but not with Web Workers , they will load it in independent thread asynchronously.
What scared me in Physi.js
When I started learning Physi.js structure on GitHub I noticed that Ammo.js library there hasn’t been updated for 3 years. I compared that time with an Ammo.js repository. They updated it 2 months ago. First idea that came up into my head was to replace existing one in Physi.js with the newest.
转载本站任何文章请注明：转载至神刀安全网，谢谢神刀安全网 » Porting Bullet Physics into Ammo.js and improving Physi.js