fix: resolve mobile safe area and viewport issues

This commit is contained in:
OpenClaw Assistant 2026-09-01 20:44:48 +02:00
parent 40377caaa3
commit 5b6310a980
2 changed files with 6 additions and 4 deletions

View file

@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <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> <title>Pop! Pop! Pop!</title>
<style> <style>
body { body {
@ -13,7 +13,7 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 100vh; height: 100dvh;
width: 100vw; width: 100vw;
} }
canvas { canvas {

View file

@ -105,8 +105,10 @@ class PopScene extends Phaser.Scene {
const config = { const config = {
type: Phaser.AUTO, type: Phaser.AUTO,
width: window.innerWidth, scale: {
height: window.innerHeight, mode: Phaser.Scale.RESIZE,
autoCenter: Phaser.Scale.CENTER_BOTH,
},
parent: 'game-container', parent: 'game-container',
scene: [PopScene], scene: [PopScene],
physics: { physics: {