Closed isaac-mason closed 1 year ago
For some extra context on my use case:
I and some others in the Poimandres community are keen to start using Jolt Physics in game-dev web projects.
The folks at Poimandres maintain a library called @react-three/fiber, which simplifies creating 3d experiences with React and three.js. We've created wrappers for physics libraries before, such as @react-three/cannon and @react-three/rapier. There's interest in doing the same for Jolt, especially given its leaning toward game-development use cases.
Hello,
I agree that it would be great to publish Jolt as a npm package, problem is that I'm a C++ coder and I know very little about the whole JavaScript community and the eco system around it. So if you want to help out and make it easier for people to integrate the library then your help is very welcome!
W.r.t. the actual packages: Is there also interest in having a debug version of the library as a package? I've noticed that when you do something wrong in JavaScript and call a C++ function the browser just throws a very cryptic error message that tells me nothing unless I build a debug version and I see the actual C++ code that triggered e.g. an assert.
Hi jrouwe, I am part of the Poimandres community with Isaac. A debug version sounds very useful. To be honest, a lot of us are trying to figure out the best workflow for working with WASM packages inside JS so we are learning too! And some additional debug features sounds like it would help us be able to give you the right info in tickets we might open. Thanks again for making this amazing library open source.
A debug version could be useful, for sure! And +1 to what @krispya said, we have plenty to learn in this space.
I'll find some time soon to make a draft PR for what we've discussed above (publishing to npm, debug build, etc)
Hi!
First off - this is such an exciting project!
In order to make consumption of the library easier, it would be great to publish the library to npm.
As for how this could look, another physics library with js bindings, Rapier, publishes two packages to npm:
@dimforge/rapier3d
(likeExamples/js/jolt.wasm.js
+Examples/js/jolt.wasm.wasm
)@dimforge/rapier3d-compat
- (likeExamples/js/jolt.js
)The same approach could be used here?
I'm very happy to help with this.