-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix test bed #110
Fix test bed #110
Conversation
Adapted from kripken#87 (comment).
demo/html5canvas/testbed.html
Outdated
@@ -21,6 +21,9 @@ | |||
<script type="text/javascript"> | |||
var Box2D; | |||
if (!Box2D) Box2D = (typeof Box2D !== 'undefined' ? Box2D : null) || Module; | |||
var Box2DConstructor = Box2D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like this is never used?
demo/html5canvas/testbed.html
Outdated
@@ -21,6 +21,9 @@ | |||
<script type="text/javascript"> | |||
var Box2D; | |||
if (!Box2D) Box2D = (typeof Box2D !== 'undefined' ? Box2D : null) || Module; | |||
var Box2DConstructor = Box2D | |||
Box2D = Box2D() | |||
Module = Box2D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this also doesn't look used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed line 24 (Box2DConstructor
) but if I remove the other 2 lines, I get this error message:
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:27)
I think those 2 lines are essential to the working of the test bed.
Adapt the solution from #87 (comment) and fix script loading error to make the test bed work again.
Fixes #97.