kripken / box2d.js

Port of Box2D to JavaScript using Emscripten
1.33k stars 196 forks source link

FUNCTION_TABLE not declared #23

Open rathb003 opened 11 years ago

rathb003 commented 11 years ago

With the latest box2d.js, it looks like there is a bug with adding collisions.

I used the method mentioned in the README to implement the Collision events. But I get an error because FUNCTION_TABLE is not defined. I went through a bit and realized that FUNCTION_TABLE is not declared anywhere.

kripken commented 11 years ago

Yes, how function tables works has changed. I guess we don't have testing for that. Can you perhaps make a little standalone testcase for this?

kripken commented 11 years ago

This should be fixed now, but have not confirmed with a testcase.

rathb003 commented 11 years ago

Thank you for the update. I don't have a standalone testcase but I will check it against my previous code that failed and will update to let you know if it works with that. Thank you once again for all the updates.

rathb003 commented 11 years ago

I checked it against my previous code and still get the same error:

ReferenceError: Can't find variable: FUNCTION_TABLE. Source: file:///opt/usr/apps/cDe1v9MApN/res/wgt/assets/sources/js/libs/box2d_202.js:43069 (Line: 43069). Forcefully disabling component!

rathb003 commented 11 years ago

If this functionality has changed, what is the best way to detect/use collision events right now? Or is there any other way? As in, how have other people been getting collision events and such? Any help would be greatly appreciated. Thank you once again.

kripken commented 11 years ago

If it still fails, please provide a testcase i can reproduce the problem with.