-
Notifications
You must be signed in to change notification settings - Fork 22
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
Port Box2D v3? #78
Comments
I am also wondering this as I have been considering beginning to implement better JavaScript bindings for v3 with Emscripten. I noticed you submitted a pull request to the Box2D repo recently, as have I. I'm aiming to start this work in the next week or two, but would hold off if it is easier for you to update the bindings. |
@aleph1 See the progress on this project! |
my existing box2d3-wasm attempt already cleanly solves a lot of the problems of how to build this stuff and generate bindings and types, etc. I don't know how far it'll get in "next week or two" timescales, but if I can find a couple of spare evenings I'll have a better idea of whether the hardest problems (threading, SIMD, callbacks) are actually hard, and whether the bindings work or have surprises. |
Thanks for the update. It might be worth noting that threading seems to work in the self-contained WASM build using Emscripten’s options `-pthread -s USE_PTHREADS=1`. You can see the results from that test here: erincatto/box2d#842 <erincatto/box2d#842>. In order to serve up the Box2D benchmarks built as WASM I just used an Express.js server running locally and everything worked as expected in Chrome and Firefox on macOS. If you want me to post these builds somewhere you can access them just let me know.
Would you consider accepting pull requests for box2d3-wasm if I make any progress on my end?
… On Dec 13, 2024, at 2:00 PM, Birch-san ***@***.***> wrote:
I am also wondering this as I have been considering beginning to implement better JavaScript bindings for v3 with Emscripten. I noticed you submitted a pull request to the Box2D repo recently, as have I <erincatto/box2d#841>. I'm aiming to start this work in the next week or two, but would hold off if it is easier for you to update the bindings.
my existing box2d3-wasm <https://github.com/Birch-san/box2d3-wasm> attempt already cleanly solves a lot of the problems of how to build this stuff and generate bindings and types, etc. I don't know how far it'll get in "next week or two" timescales, but if I can find a couple of spare evenings I'll have a better idea of whether the hardest problems (threading, SIMD, callbacks) are actually hard, and whether the bindings work or have surprises.
—
Reply to this email directly, view it on GitHub <#78 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AADWSWT6FUWJJOTSQ5C3UWT2FM4FPAVCNFSM6AAAAABNN7MTJSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBSGIYDOMJUGE>.
You are receiving this because you were mentioned.
|
okay that's encouraging, so does emscripten automatically do all the shenanigans required to spin up pthreads as Web Workers? in the past I've found Web Workers to be pretty horrible to get working with bundlers like webpack. if Firefox now supports SharedArrayBuffer that's encouraging. yeah, happy to consider PRs |
Hi @Birch-san !
Do you have plans to port Box2D v3?
The text was updated successfully, but these errors were encountered: