Ammo.js - Low heap Builds


For my project I noticed that I don’t need 64MB of heap for ammo.js, that eventually crashes on some older mobile devices. So I compiled ammo to use only 8MB, 16MB or 32MB.

You can find the WASM builds here

Just override the 3 default ammo files and update ammo.wasm.wasm asset to
Name ‘Ammo’ and set Glue script to ammo.wasm.js and Fallback script to ammo.js.
Just like the default.

Enjoy the free heap memory to be consumed by your awesome app!



Thanks, this is useful. Although, I don’t really like google drive, as some regions don’t have access to it. Maybe you could create a public PlayCanvas project with those? An empty project with just those 8MB, 16MB and 32MB folders with respective files in them.

While you are at it, you could create an Ammo lite version as well :slight_smile: I did it in some size sensitive projects. You could remove the debug drawer and some other parts from IDL that are not needed, maybe even the vehicle part.


@TRT Thanks for sharing, maybe you wouldn’t mind creating a lite version that LeXXik mentioned?

Here’s a list of what can be removed

  • raycast vehicle
  • debug drawer
  • GIMPACT collision solver
  • soft body sim
  • kinematic character controller