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?