Phaser API Documentation

start(zoom, [duration], [ease], [force], [callback], [context])


This effect will zoom the Camera to the given scale, over the duration and with the ease specified.


name type arguments Default description
zoom number

The target Camera zoom value.

duration number <optional> 1000

The duration of the effect in milliseconds.

ease string | function <optional> 'Linear'

The ease to use for the Zoom. Can be any of the Phaser Easing constants or a custom function.

force boolean <optional> false

Force the zoom effect to start immediately, even if already running.

callback Phaser.Types.Cameras.Scene2D.CameraZoomCallback <optional>

This callback will be invoked every frame for the duration of the effect. It is sent three arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is, and the current camera zoom value.

context any <optional>

The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.


The Camera on which the effect was started.

Since: 3.11.0