Closed adarah closed 1 year ago
It makes no sense to call resizeCanvasToDisplaySize
in a worker as there is no display size in a worker. Any display size you want would have to be passed from your main page into the worker and of course twgl would no idea how you're going to do that.
As for ideas, this article shows one way to make a proxy to send this info to your worker.
I see, I'll study that article then, thanks for responding so quickly!
I was porting some code which ran in the main thread to a Web Worker via the OffscreenCanvas API, and I noticed that calling
resizeCanvasToDisplaySize
was making my scene disappear. Is this intended behavior? If so, do you have any recommendations on how to work around this limitation so that I can still have the canvas resizing functionality in the Web Worker?