Phaser API Documentation

  Version: 
fadeIn([duration], [red], [green], [blue], [callback], [context])

Description:

Fades the Camera in from the given color over the duration specified.

Parameters:

name type arguments Default description
duration number <optional> 1000

The duration of the effect in milliseconds.

red number <optional> 0

The amount to fade the red channel towards. A value between 0 and 255.

green number <optional> 0

The amount to fade the green channel towards. A value between 0 and 255.

blue number <optional> 0

The amount to fade the blue channel towards. A value between 0 and 255.

callback function <optional>

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

context any <optional>

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

Returns:
Description:

This Camera instance.

Since: 3.3.0
Source: src/cameras/2d/Camera.js (Line 273)