How to get the level of the current viewport?

Hi Cesium team,I want to get the level of the current viewport. perhaps this level is the RasterOverlay’s level. like this:


but I find the code :

this is calculated in this way too difficult for me,Is there a simpler way to get it, For example, compute it based on the current camera height,thanks !

This “level” is crucial for me, as I need it to build my model, and the appearance of the model is transformed based on it. Is there any additional method to obtain it?

Different parts of the scene will have different levels. There’s no single level across the scene.

oh,This means that tiles or rasteroverlays at different distances have different levels in the same viewport?

@IndigoYun Yes, that’s the nature of 3D Tiles. Levels of detail are loaded based on distance from the camera.

I see ,thanks for your anwser!