Camera Fade Out and In

Demonstrates how to chain camera fade effects using the camera fade completion event to transition between different scenes or images.

Camera Fade Out and In, running
800 × 600
GitHub
class Example extends Phaser.Scene
{
    constructor ()
    {
        super();
    }

    preload ()
    {
        this.load.setBaseURL('https://cdn.phaserfiles.com/v410');
        this.load.image('robota', 'assets/pics/robota-uxo-by-made-of-bomb.jpg');
        this.load.image('neuromancer', 'assets/pics/neuromancer.jpg');
    }

    create ()
    {
        this.add.image(400, 300, 'robota');

        this.cameras.main.once('camerafadeoutcomplete', function (camera) {

            this.add.image(400, 300, 'neuromancer');

            camera.fadeIn(6000, 255);

        }, this);

        this.cameras.main.fadeOut(6000, 255);
    }
}

const config = {
    scale: { mode: Phaser.Scale.FIT },
    type: Phaser.AUTO,
    parent: 'game-container',
    width: 800,
    height: 600,
    scene: Example
};

const game = new Phaser.Game(config);

More in Camera68 examples