For your game scaling woes. It shows the Scale Manager state and logs events. See demos.
You must use type: Phaser.CANVAS
in the game config.
this.load.plugin('PhaserDebugGameScalePlugin', 'https://cdn.jsdelivr.net/npm/[email protected]', true)
game.scene.getScenes(true)[0].sys.load.plugin('PhaserDebugGameScalePlugin', 'https://cdn.jsdelivr.net/npm/[email protected]', true).start()
<!-- after phaser.js -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
/* global PhaserDebugGameScalePlugin */
new Phaser.Game({
type: Phaser.CANVAS,
plugins: {
global: [
{ key: 'DebugGameScalePlugin', plugin: PhaserDebugGameScalePlugin, start: true }
]
}
}
import DebugGameScalePlugin from 'phaser-plugin-debug-game-scale'
new Phaser.Game({
type: Phaser.CANVAS,
plugins: {
global: [
{ key: 'DebugGameScalePlugin', plugin: DebugGameScalePlugin, start: true }
]
}
}