calculateZoomLevelFromDistance(options, distance): number
Calculates the zoom level, which corresponds to the current distance from
camera to lookAt point.
Therefore the zoom level is a float and not an int. The height of the camera can be in
between zoom levels. By setting the zoom level, you change the height position of the camera
in away that the field of view of the camera should be able to cover one tile for the given
zoom level.
As an example for this, when you have a tile of zoom level 14 in front of the camera and you
set the zoom level of the camera to 14, then you are able to see the whole tile in front of
you.
Calculates the zoom level, which corresponds to the current distance from camera to lookAt point. Therefore the zoom level is a
float
and not anint
. The height of the camera can be in between zoom levels. By setting the zoom level, you change the height position of the camera in away that the field of view of the camera should be able to cover one tile for the given zoom level.As an example for this, when you have a tile of zoom level 14 in front of the camera and you set the zoom level of the camera to 14, then you are able to see the whole tile in front of you.