Birch-san / box2d-wasm

Box2D physics engine compiled to WebAssembly. Supports TypeScript and ES modules.
263 stars 21 forks source link

C++ Version of LiquidFun integration? #56

Open KTRosenberg opened 1 year ago

KTRosenberg commented 1 year ago

This seems to be the only attempt to re-merge LiquidFun into the latest box2d, but it seems to build a final wasm, rather than generating source files for inclusion in a project. Would you know if there is a way to get updated sources for integration in a C++ project?

Birch-san commented 1 year ago

the WebAssembly is built from C++.
my fork of box2d's C++ has the liquidfun source manually-rebased onto it:
https://github.com/google/liquidfun/issues/81#issuecomment-787498634

KTRosenberg commented 1 year ago

Ah, thank you for the link. Somehow I missed it. Is this something I could update with fixes from the main branch? Some things have been tweaked in the past few months. I might have missed some automatic script you might have used.

By the way, I assume this won’t really be supported in the long run. Version 3 was just announced and it’s going to have a major overall.

I wonder: is there a way to incorporate the essential elements of liquidfun (or some alternative liquid simulation) into the base branch without modifying the original source quite as significantly?

For example: instead of modifying function signatures, use a global context.