Is there any way get Zoom Level?

Is there any way get Zoom Level?
I have some layer , I only want to show them when user Zoom In > 12.
How could I get the zoom level from where my camera locate.

There’s no way to get the zoom level, since unlike 2D, in 3D it is not constant across the entire scene.

If you’re talking about imagery, you can set minimumLevel, but that may not be the ideal solution for your use case:

Gets the minimum level-of-detail that can be requested. Generally, a minimum level should only be used when the rectangle of the imagery is small enough that the number of tiles at the minimum level is small. An imagery provider with more than a few tiles at the minimum level will lead to rendering problems.

Instead I suggest using the camera distance from the ellipsoid to determine the show value.