What do you think is the best approach to have an efficient way to get geometries to hide depending on the distance of camera?
I have some buffer geometry meshes representing some cubes (a lot it’s why I need only 1 mesh with all cubes geometry in it for performance). 1 mesh for each zoom level.
Imagine a bunch of random cubes like some examples shows placed in a cubic space, this is 1 level. Then each cube is also a cubic space for a bunch of other smaller random cubes, and so on…
I want then each cube (separately) to hide when camera goes close to it to show the smaller cubes in it. The farther bigger cubes stay visible dont showing it’s nested cubes.
I need 2 distance triggers, 1 to load the smaller cubes hidden, and 1 to hide the containing cube to show the smaller.
Any advice to get something smooth and not lagging?