ammo.js
ammo.js copied to clipboard
Error with PhysiJS
Hello, I use the Physi.js library for Three.js, the library has not been updated for a while now, I changed the old Ammo into Ammo() in the physijs_worker.js, I use the WASM version of Ammo.js, I get an error that seems to come from Ammo: (from ammo.wasm.js:326 at the apply call)
Uncaught TypeError: Cannot read property 'apply' of undefined
at Ammo.b._emscripten_bind_btVector3_btVector3_3 (ammo.wasm.js:formatted:3597)
at Object.n [as btVector3] (ammo.wasm.js:formatted:4893)
at Object.public_functions.init (physijs_worker.js:246)
at self.onmessage (physijs_worker.js:1412)
How can i solve this problem? Thank you
One possible issue is that wasm startup is asynchronous. See the example code for the async API: https://github.com/kripken/ammo.js/blob/master/examples/webgl_demo/worker.js#L6
@log4b0at Hello! You may try ammonext builds, as we added features that were required by PhysiJS or physics-module-ammonext for WhitestormJS framework: https://github.com/WhitestormJS/AmmoNext/tree/master/builds