Closed q975702873 closed 5 months ago
It was ultimately discovered that the width: window. innerWidth * 4 was caused by an excessively large value thanks!
const config = { type: Phaser.AUTO, width: window.innerWidth 4, height: window.innerHeight 4, parent: 'game-container', backgroundColor: '#fcc1db', scale: { mode: Phaser.Scale.FIT, }, scene: [ Game ] };
Version
Description
Example Test Code
Additional Information
A project launched using the Vue3 template, I don't know why it keeps repeatedly rendering the DOM App.vue
main.js const config = { type: Phaser.AUTO, width: window.innerWidth 4, height: window.innerHeight 4, parent: 'game-container', backgroundColor: '#fcc1db', scale: { mode: Phaser.Scale.FIT, }, scene: [ Game ] };
const StartGame = (parent) => { return new Phaser.Game({ ...config, parent }); }
PhaserGame.vue
Game.js