pmndrs / react-three-offscreen

📺 Offscreen worker canvas for react-three-fiber
https://offscreen.pmnd.rs
MIT License
456 stars 19 forks source link

Feature request: Support shared workers #12

Open rationalthug opened 1 year ago

rationalthug commented 1 year ago

If you are open to it, I will go ahead and create a pull request-- I think it should be relatively straight forward after looking through the code in Canvas.tsx and render.ts.

For my own use case, shared workers support would be extremely helpful because an essential library already runs in a worker but needs to initiate communication with the worker that was passed to react-three-offscreen (which was, of course, invoked from the main thread.)