Birch-san / box2d-wasm

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

Function `b2Body::ApplyLinearImpulseToCenter` missing #36

Closed BlueNebulaDev closed 2 years ago

BlueNebulaDev commented 2 years ago

b2Body::ApplyLinearImpulseToCenter seems to be missing.

It's absolutely not a problem, as it's trivial to use b2Body::ApplyLinearImpulse instead, but I thought it was a good idea to report a missing function.

Birch-san commented 2 years ago

hmmm yeah; you're right:
https://github.com/Birch-san/box2d-wasm/blob/e01c5e14e9b53bec59aed4803f5a41a709ddeb2c/box2d-wasm/Box2D.idl#L246-L250

https://github.com/erincatto/box2d/blob/cd2c28dba83e4f359d08aeb7b70afd9e35e39eda/include/box2d/b2_body.h#L229

looks like a gap inherited from the original box2d.js bindings:
https://github.com/kripken/box2d.js/blob/1e6e9da36a3160a9f40cda4cddcb4f83abb4d82c/Box2D_v2.3.1.idl#L218-L222

easy enough to add; will expose this at next convenience.

dimitrisx commented 2 years ago

Thank you very much!

Birch-san commented 2 years ago

v7.0.0 exposes b2Body#ApplyLinearImpulseToCenter