Closed Joncom closed 11 years ago
When I open that page, it says Box2D is not defined, and http requests fail to embox2d.js
That is because you need to copy box2d.js into that folder first and rename it to embox2d.js
On 2013-07-15, at 10:38 AM, Alon Zakai notifications@github.com wrote:
When I open that page, it says Box2D is not defined, and http requests fail to embox2d.js
— Reply to this email directly or view it on GitHub.
Oh, right. Was there a reason not to just use box2d.js from the parent dir?
None that I can think of.
On Jul 15, 2013, at 12:42 PM, Alon Zakai notifications@github.com wrote:
Oh, right. Was there a reason not to just use box2d.js from the parent dir?
— Reply to this email directly or view it on GitHub.
Ok, pushed that.
Back to the main topic, it looks like GetMassData excepts a parameter: void GetMassData(b2MassData* massData) const;
. Buliding a debug build, the error is that we try to use the parameter and fail. So we should either create an alternative version that returns a value, or pass in the right parameter I think.
Apologies, you are correct.
That's what I get for posting the issue from memory long after experiencing it.
So the real issue is that body.GetMassData(massData)
fails because b2MassData
is unbound.
Test case:
box2d.js/html5canvas_demo/testbed.html
in browser.world.GetBodyList().GetMassData();
in console.This error is returned:
TypeError: Cannot read property 'ptr' of undefined