Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 581 Bytes

File metadata and controls

39 lines (29 loc) · 581 Bytes

Phaser 3 Pause Render Plugin 📱🔥

Install

new Phaser.Game({
    plugins: {
        global: [
            { key: 'PhaserPauseRenderPlugin', plugin: PhaserPauseRenderPlugin, mapping: 'render' }
        ]
    }
}

You can use any mapping.

Modules

import PauseRenderPlugin from 'phaser-plugin-pause-render';

Then use the imported value instead of PhaserPauseRenderPlugin.

Use

// In a scene:

this.render.pause();
this.render.resume();

this.render.paused = true;
this.render.paused = false;