For your game scaling woes. It shows the Scale Manager state and logs events. See demos.
<script src="https://cdn.jsdelivr.net/npm/phaser-plugin-debug-game-scale@4.1.0"></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 }
]
}
}
You must use the Phaser.CANVAS
renderer.
// In preload():
this.load.plugin('PhaserDebugGameScalePlugin', 'https://cdn.jsdelivr.net/npm/phaser-plugin-debug-game-scale@4.1.0', true)
// In console:
game.scene.getScenes(true)[0].sys.load.plugin('PhaserDebugGameScalePlugin', 'https://cdn.jsdelivr.net/npm/phaser-plugin-debug-game-scale@4.1.0', true).start()