kripken / box2d.js

Port of Box2D to JavaScript using Emscripten
1.32k stars 198 forks source link

"b2Manifold" is not bound / is not accessible. #26

Open Joncom opened 11 years ago

Joncom commented 11 years ago

Test case:

  1. Open up box2d.js/html5canvas_demo/testbed.html in browser.
  2. You should now be looking at the "dominos" test.
  3. Type the following code in console:
var body = world.GetBodyList(); // returns b2Body instance
var edge = body.GetContactList(); // returns b2ContactEdge instance
var contact = edge.get_contact(); // returns b2Contact instance
var manifold = contact.GetManifold(); // returns Object (should be b2Manifold!)
var localNormal = manifold.get_localNormal();
// ^ TypeError: Object #<Object> has no method 'get_localNormal'

localNormal is a public attribute of b2Manifold and should be accessible via get_localNormal().