-
Notifications
You must be signed in to change notification settings - Fork 150
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
[Bug?]: the hexPolygonResolution doesnt update after init #135
Comments
@BangNguyen1992 thanks for reaching out. This was indeed a bug that was just fixed in this underlying module: vasturiano/three-globe@dfa2f8d If you update your dependency tree to include at least |
Hello @vasturiano, thank you for the quick update, it works for me now. However, when I change the Thank you |
@BangNguyen1992 are you using high values for the resolution? That would explain the CPU burst. The higher the value the more strain it puts on the Hex processor and more ThreeJS objects get generated. |
Hello @vasturiano, I am not sure if changing from 3 to 4 is considered high. What I want is to have a hex polygon layer but when the user zoom in, I want them to see the hexagon as a rounded shape. Therefore, my idea is to increase the |
Hello @vasturiano, I understand that increasing the Is there any way to make the generating new Theejs objects without blocking the transition/animation of the current process? It's fine if the generation takes a longer time. Example:
Is it possible to achieve that scenario? Thank you for this amazing library |
@BangNguyen1992 the bulk of the CPU load is caused by the hex coordinate generation by h3-js. I can only imagine what you describe being possible if that operation is offloaded off the main thread using web workers. Unfortunately this is not currently supported in this module, it would be a non-trivial change to add this type of asynchronous functionality. |
Thank you @vasturiano, I think I have approached it in the wrong way, which makes the issue become more complicated than it should be. 😅 I am closing the issue now since the bug had been fixed. |
Describe the bug
I want to change the hexPolygonResolution of the hexPolygon layer when the user zoom in/out. However, after the 1st init, the hexPolygonResolution doesn't update accordingly to the input value. I have tried with function as well, but still still not work.
Example:
hexPolygonResolution={() => zoomIn ? 4 : 3 }
-> but it doesn't change when zoomIn value changedTo Reproduce
hexPolygonResolution
value dynamically like the example aboveExpected behavior
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: