-
Notifications
You must be signed in to change notification settings - Fork 298
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
Performance issue for cursor events on 3d polygon geometry. #32
Comments
Thanks for reaching out @knackstedt. Yes, it is expected that animations on the conic polygons do consume a bit of CPU capacity. The reason is that geometries need to be calculated for all the intermediate positions of the interpolator. These geometries are calculated using three-conic-polygon-geometry and there is some complexity to those objects. I've optimized what I could in both the geometry lib and in globe.gl, and not certain there's a lot more that can be done other than use it on powerful enough GPU hardware. |
The system that I'm using for this is very beefy. It's running a Ryzen 9 3900XT and a GeForce RTX 3090. A Possible remedy would be enforcing this transition to only apply to a single mesh at a time. It might be better suited as an issue with three-globe instead of globe.gl. I'm not sure I fully understand the differences between the two yet. |
@knackstedt I've done some experimenting and ended up with a solution that has better performance during transitions. Essentially, as you suggested, instead of re-generating geometries at every tick of the tween it's merely applying a scaling factor to the existing geometries. Let me know if you see an improvement on your side. |
@vasturiano I can clearly see better performance this way. The fact that you were able to implement a solution so quickly is very impressive :) |
Describe the bug
Cursor movements triggering polygon expansion via .onPolygonHover causes significant delay when animating multiple polygons at the same time.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Smooth transitions and animations when animating polygon geometry.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Likely an issue with re-generating the mesh for the animation.
The text was updated successfully, but these errors were encountered: