fix: resolve mobile safe area and viewport issues
This commit is contained in:
parent
40377caaa3
commit
5b6310a980
2 changed files with 6 additions and 4 deletions
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
|
||||
<title>Pop! Pop! Pop!</title>
|
||||
<style>
|
||||
body {
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
height: 100dvh;
|
||||
width: 100vw;
|
||||
}
|
||||
canvas {
|
||||
|
|
|
|||
|
|
@ -105,8 +105,10 @@ class PopScene extends Phaser.Scene {
|
|||
|
||||
const config = {
|
||||
type: Phaser.AUTO,
|
||||
width: window.innerWidth,
|
||||
height: window.innerHeight,
|
||||
scale: {
|
||||
mode: Phaser.Scale.RESIZE,
|
||||
autoCenter: Phaser.Scale.CENTER_BOTH,
|
||||
},
|
||||
parent: 'game-container',
|
||||
scene: [PopScene],
|
||||
physics: {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue