Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with PhysiJS #203

Open
log4b0at opened this issue May 21, 2018 · 2 comments
Open

Error with PhysiJS #203

log4b0at opened this issue May 21, 2018 · 2 comments

Comments

@log4b0at
Copy link

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

@kripken
Copy link
Owner

kripken commented May 21, 2018

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

@sasha240100
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants