pmndrs / react-three-offscreen

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

Passing context to the worker #7

Closed snsie closed 1 year ago

snsie commented 1 year ago

I'm currently working on app that would benefit from using an offscreen canvas, but the canvas depends on context that is passed using a BridgeProvider. What would be the best approach to make this work in this scenario?

Thank you!

drcmda commented 1 year ago

these are two different threads, they are completely separate. it is better to use this for self contained apps like the docs say but if you need to communicate you can use web broadcasts, worker postmessage, sockets, etc.