Phaser API Documentation

  Version: 
Event: ZOOM_START
Phaser.Cameras.Scene2D.Events.ZOOM_START
ZOOM_START

Description:

The Camera Zoom Start Event.

This event is dispatched by a Camera instance when the Zoom Effect starts.

Listen for it via either of the following:

this.cameras.main.on('camerazoomstart', () => {});

or use the constant, to avoid having to remember the correct event string:

this.cameras.main.on(Phaser.Cameras.Scene2D.Events.ZOOM_START, () => {});

Parameters:

name type description
camera Phaser.Cameras.Scene2D.Camera

The camera that the effect began on.

effect Phaser.Cameras.Scene2D.Effects.Zoom

A reference to the effect instance.

duration number

The duration of the effect.

zoom number

The destination zoom value.

Since: 3.3.0