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

WorkerSolver: Update worker solver to use a basic ArrayBuffer rather than SharedArrayBuffer #44

Closed
gkjohnson opened this issue Oct 22, 2020 · 2 comments · Fixed by #67
Closed
Labels
enhancement New feature or request
Milestone

Comments

@gkjohnson
Copy link
Owner

gkjohnson commented Oct 22, 2020

SharedArrayBuffers are not always available on all platforms including Chrome on Android

@gkjohnson gkjohnson added the enhancement New feature or request label Oct 22, 2020
@gkjohnson gkjohnson modified the milestones: v0.0.x, v0.0.3 Dec 28, 2020
@gkjohnson
Copy link
Owner Author

Not available in Safari, either, but they have been reenabled behind a flag in the latest technology preview. And it sounds like there's a plan to get them enabled again on Chrome Android.

Trading the buffers back and forth would be a bit complicated and performance may suffer a bit, as well. We could just transfer results the IK is converged? Or the solver can continue to iterate in the background while the buffer is transferred, applied, and then immediately transferred back.

@gkjohnson
Copy link
Owner Author

Instead we should automatically fall back ArrayBuffers and swap them back and forth:

const useSharedArrayBuffer = ( typeof SharedArrayBuffer ) !== 'undefined';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant