kripken / box2d.js

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

Fix testbed html #113

Closed AssafKr closed 4 years ago

AssafKr commented 4 years ago

While trying to load testbed.html I got the following error in console:

Uncaught TypeError: Box2D.JSDraw is not a constructor
    at getCanvasDebugDraw (embox2d-html5canvas-debugDraw.js:85)
    at init (embox2d-html5canvas-testbed.js:275)
    at window.onload (testbed.html:28)

Looking at the Box2D variable, it seemed to be a Promise Tested on latest vesions of Chrome, Edge and Firefox