phaserjs / phaser

Phaser is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.
https://phaser.io
MIT License
36.93k stars 7.08k forks source link

Problem with canvas centering #6789

Open dominikhalvonik opened 5 months ago

dominikhalvonik commented 5 months ago

Version

Description

Occasionally, but not always, on iOS operating systems the canvas is not centered within the div where it should be. This issue also occurs on a fresh Phaser instance that contains only one scene and one game object, so it is unlikely to be related to our implemented logic. It seems more probable that the problem is linked to the configuration settings. This Phaser project is incorporated into a Vue.js 3 environment.

Test Code

Vue.js 3 component

image image image

index.ts whre launch() function is defined

image

Phaser.Game config

image

Additional Information

The issue appears as shown in the attached image. canvas

dominikhalvonik commented 5 months ago

For some reason the code formating on Github is not working correctly.