globe.gl
globe.gl copied to clipboard
Hexed Polygons and Custom Layer with lag
Describe the bug
I created my own custom layer based on the example that you have and I tried to combine it with the new Hexed Polygons Layer
but it is not working properly, take a look to the videos for a better explanation:
For the videos, I used the Custom and the Hexed examples, but happens the same with my own layer:
To Reproduce
Expected behavior
The animation of the custom layer should be as fluid as this:
But when I add the Hexed the custom layer animation reproduce with a lot of lag:
I tried to debug but didn't find a solution.
The current hexed polygons layer is rather heavy as it generates a large number of polygon geometries. The higher the hex resolution, the worse it gets.
This needs some profiling to see if something can be done to optimize the performance, but it's a tough one I think.
For now what you can to alleviate the strain is to lower the hexPolygonResolution
.
@vikgmdev you only thing your can try rightnow is lower the hexPolygonResolution
to improve some performance
Otherwise, it requires a new method to create hex polygon layer. e.g. a simple polygon geometry with custom shader or texture to simulate hexes. But it's complex, hope someone could done in the future
@vikgmdev I've done some improvements to the geometries on the hexed polygons layer, and it's performing much better. See the example at: https://globe.gl/example/hexed-polygons/
Available in the latest version: v2.12.4
.
Thanks, @vasturiano @lslzl3000 I'll give it a try and let you know how it performs