Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I make a TileCreasedNormalsPlugin that runs in a worker, how to upstream it here? #1001

Open
vincent-lecrubier-skydio opened this issue Feb 24, 2025 · 1 comment
Labels
question Further information is requested

Comments

@vincent-lecrubier-skydio

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

@vincent-lecrubier-skydio vincent-lecrubier-skydio added the question Further information is requested label Feb 24, 2025
@gkjohnson
Copy link
Contributor

gkjohnson commented Feb 24, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants