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

Polyfill performance.now on global object #325

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

brianchirls
Copy link

If cannon.js is included in a script that runs in strict mode, the polyfill of performance will throw an error because it's undeclared. You can see this by adding "use strict" to World.js or the built script and running the web workers example in Mobile Safari (iOS only supports performance in the main thread, not in a worker) or running the unit test (node doesn't support performance at all).

In browsers, the polyfill needs to be set on self in either worker or the main thread. In node, it needs to be set on global.

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.

None yet

1 participant