Skip to content
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

Merged
merged 3 commits into from
Jun 1, 2020
Merged

Fix test bed #110

merged 3 commits into from
Jun 1, 2020

Conversation

huy-nguyen
Copy link
Contributor

Adapt the solution from #87 (comment) and fix script loading error to make the test bed work again.

Fixes #97.

@@ -21,6 +21,9 @@
<script type="text/javascript">
var Box2D;
if (!Box2D) Box2D = (typeof Box2D !== 'undefined' ? Box2D : null) || Module;
var Box2DConstructor = Box2D
Copy link
Owner

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?

@@ -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
Copy link
Owner

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?

Copy link
Contributor Author

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.

demo/html5canvas/testbed.html Outdated Show resolved Hide resolved
helpers/embox2d-helpers.js Show resolved Hide resolved
@huy-nguyen huy-nguyen requested a review from kripken June 1, 2020 20:31
@kripken kripken merged commit f75077b into kripken:master Jun 1, 2020
@huy-nguyen huy-nguyen deleted the fix-testbed branch June 1, 2020 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The neweat Testbed is broken
2 participants