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

Clarify exactly what Ammo WASM build we should use... #16

Closed
diarmidmackenzie opened this issue Nov 12, 2022 · 2 comments
Closed

Clarify exactly what Ammo WASM build we should use... #16

diarmidmackenzie opened this issue Nov 12, 2022 · 2 comments

Comments

@diarmidmackenzie
Copy link
Member

diarmidmackenzie commented Nov 12, 2022

From @vincentfretin comments in PR #14...

In AmmoDriver.md we talk about the ammo.js mozilla fork and the original kripken repo
http://kripken.github.io/ammo.js/builds/ammo.wasm.js
https://github.com/kripken/ammo.js
there are some recent commits in this repo https://github.com/kripken/ammo.js/commits/main

I see that in all examples we use
https://mixedreality.mozilla.org/ammo.js/builds/ammo.wasm.js
it doesn't seem to be the same build as the hubs branch in https://github.com/mozillareality/ammo.js
Do you know from which code source this build comes from?
Are we sure it's still an up to date version or should we switch back to a build from the original kripken repo?

from https://github.com/MozillaReality/ammo.js/tree/hubs/master/builds latest build from Dec 9, 2019

$ md5sum ammo.wasm.*
b9fad0a49e64f4fa99fe43aa1fb85de3  ammo.wasm.js
8640fe8d5bf91d2e84ea56e0c1307ba9  ammo.wasm.wasm

Hubs is using this build, https://github.com/mozilla/hubs/blob/master/package.json#L78

hubs (master) $ ag ammo.js src/
src/systems/physics-system.js
4:import ammoWasmUrl from "ammo.js/builds/ammo.wasm.wasm";

from https://mixedreality.mozilla.org/ammo.js/builds/

$ md5sum ammo.wasm.*
96789d18db20709b41f5ecfe607b5b51  ammo.wasm.js
0dc6487e17ff5e126cf6c925f5f04f35  ammo.wasm.wasm

It's actually an old version, the md5sum matches the build from May 9, 2019

So the link https://mixedreality.mozilla.org/ammo.js/builds/ammo.wasm.js is an old build from
https://github.com/MozillaReality/ammo.js/commits/hubs/master May 9, 2019, not the latest version Dec 11, 2019 that Hubs is using right now.

Short term, we should make sure it aligns with the docs (as long as the docs point somewhere sensible).

Longer term, we should consider making & maintaining our own fork of Ammo. Before doing that, though, I want to do more evaluation of PhysX. Given PhysX seems to perform better & APIs seem easier to work with than Ammo, it's not clear to me that long term it's going to make sense to put effort into maintaining both of them...

@vincentfretin
Copy link
Member

We can replace in the examples
https://mixedreality.mozilla.org/ammo.js/builds/ammo.wasm.js
by
https://cdn.jsdelivr.net/gh/MozillaReality/ammo.js@8bbc0ea/builds/ammo.wasm.js
to have the Dec 11, 2019 build from the hubs fork

We could also fork hubs ammo.js repo, merge the changes from latest kripken, do our own build.
I looked quickly at the commits from january 2019 until now, the change are mostly about wasm build toolchain, and exposing some additional api kripken/ammo.js#395 and kripken/ammo.js#401 for example.
I personally won't spend time trying to have a new build with latest changes simply because I don't use ammo myself, but if there is interest on those new api, you know it's there.

@vincentfretin
Copy link
Member

see n5ro#207
we should update README and example to use
https://cdn.jsdelivr.net/gh/MozillaReality/ammo.js@8bbc0ea/builds/ammo.wasm.js

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

2 participants