cameraZoom()

Information

Implementation version: beta 1.02

Description

Move the viewer's camera in the direction of the view, either forward or backward, with a movement ratio of the nth part of the camera's height. This is done to ensure that the zoom is smooth near the terrain, and the variation is greater at a high altitude. The zoom limit is 100 meters, a value from which it will stop increasing (or decreasing, in case of unusual camera approaches).

Invocation

cameraZoom(
	zoomDirection,
	divisor*
)

* Optional parameters

Input parameters

zoomDirection

Defines whether the zoom is going to be forward or backward. This is entered as a text string, which accepts one of these two options:

  1. zoomIn: for the zoom to go forward (zoom in on where the viewer camera looks).
  2. zoomOut: for the zoom to go backwards (zoom out from where the viewer camera looks).

divisor

Optional parameter; if not included, it will use the default value 3.0. It corresponds to the numerical value that controls the ratio of the camera's movement step, dividing the altitude at which the camera is by this value.

Use examples

Zoom in on the camera for one step:

cameraZoom(
	'zoomIn'
)

Zoom out of the camera for one step:

cameraZoom(
	'zoomOut'
)