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

check if window is set (when running in worker) #39

Closed
wants to merge 1 commit into from
Closed

check if window is set (when running in worker) #39

wants to merge 1 commit into from

Conversation

dreammonkey
Copy link

Hey,

Not sure if this is the right fix, but I'm currently using cannon-es in a project I'm working on and when running the physics in a worker it crashed because of the reference to the window property.

I'm not sure If the build is ok, I'm not used to working with yarn...

Ps: is there a watch option that can be used while developing the package ?

@marcofugaro
Copy link
Member

That would break the current implementation of performance.now() on node.

Didn't think about web workers, I'll do a PR soon.

@dreammonkey
Copy link
Author

Yes, it was just a quick fix, but same issue currently exists on the cannon-es-debugger repo I’m afraid...

@marcofugaro
Copy link
Member

marcofugaro commented Jun 27, 2020

Thanks for the heads up, I've opened #41.

cannon-es-debugger should be fine, we should just upgrade its cannon-es dependency.

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.

2 participants