-
Hi, what would be your suggestion to get the CameraControls working on a webworker? Using CameraControls on MainThread and sending camera transform data to the worker or sending input events? Are there plans to add better out-of-the-box support for webworker in the future? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Using CameraControls with WebWorker is not intended currently because I cannot imagine such a use case. It would be welcome if someone could send a PR for that anyway. |
Beta Was this translation helpful? Give feedback.
-
@butzemannbiber Btw, your project looks nice. When the project is released, please let me know! |
Beta Was this translation helpful? Give feedback.
Thanks for the details.
It seems worth supporting WebWorker.
Although camera-controls requires a DOM element, I think It's possible with some internal changes, according to
https://github.com/puxiao/using-orbitcontrols-in-worker/tree/main
new CameraControl( camera, virtualElement )