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

Examples: add Worker with SharedArrayBuffer #58

Merged
merged 1 commit into from
Dec 23, 2020

Conversation

marcofugaro
Copy link
Member

This PR adds an example of running physics in a worker using a SharedArrayBuffer.

It is visually the same as the worker example, just the code is different. Instead of doing a ping-pong of the position and rotation data between the worker and the main thread, the data stays just in the SharedArrayBuffer, with cannon writing to it in the worker, and three.js displaying it in the main thread.

@marcofugaro marcofugaro merged commit fa4d313 into master Dec 23, 2020
@marcofugaro marcofugaro deleted the worker-sharedarraybuffer branch December 23, 2020 22:58
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.

1 participant