distanceDisplayCondition while changing height + hFOV

Let’s take for example the LabelGraphic entity. (https://cesium.com/docs/cesiumjs-ref-doc/LabelGraphics.html?classFilter=label)

This entity exposes property called distanceDisplayCondition in order to show / hide the entity according to the distance from the camera. yet this is only good when the camera height or the zoom (hFOV/vFOV) of the camera are constant.

In my use case these both values are changing dynamically, so I could have camera that is very far from an entity yet a narrow hFOV, or the opposite, a camera that is very close to the entity but with wide hFOV so the area of the frame is big. so providing a constant value to distanceDisplayCondition is not good enough.

I am looking for a way to either change the distanceDisplayCondition dynamically or change the show / hide of the entity according to some custom logic.

CallbackProperty for the show property is not a good choice since its using a lot cpu, and I need this logic to be running all the time so it should go on the GPU the same as distanceDisplayCondition works.

Are there any suggestion how to utilize the distanceDisplayCondition in the above usecase?

Hi,

The field of view should not be affecting the distance of from camera and distanceDisplayCondition should work well. Would you be able to share a Sandcastle example or screenshots/gifs/videos of the use case?

Hey, this is more of a concept rather than actual code,

Indeed the fov does not affect the distance from the camera, but it affects the size of the footprint. and I want the ability to show / hide elements according to this size, since when the footprint is “LARGE” I want to show X+Y entities and when it’s “SMALL” i want to show X entities. (they all in the view)