I make a TileCreasedNormalsPlugin that runs in a worker, how to upstream it here?
Hi, I realized that running it in the main thread makes my FPS drop from 120FPS to ~60FPS when moving the view around a lot with Google Tiles.
So I made a version of TileCreasedNormalsPlugin that runs in a webworker. Moving it to a webworker takes the FPS back to 120FPS.
There's a little bit of subtelty involved with passing array buffers to worker and back, so the code is not trivial, but not too bad either (200 lines total).
Would you be interested in upstreaming it here? I don't see any worker support here yet
Thanks! Unfortunately webworkers are still fairly difficult to publish due to the bundling ecosystem but I think it would be okay to add this to the "examples" folder. Does the webworker run well locally? ~I recall having some issues awhile ago related to that but I don't recall the details.~ edit: This is just related to shared array buffers which presumably won't be needed here.
You might be interested to know that three-geospatial also has a version of that plugin that runs in a web worker: https://github.com/takram-design-engineering/three-geospatial/blob/main/packages/3d-tiles/src/TileCreasedNormalsPlugin.ts