Fill mobile viewport with dollhouse canvas

This commit is contained in:
Admin 2026-09-22 01:06:22 +00:00
parent 781a902d5f
commit f924e2439a
2 changed files with 14 additions and 6 deletions

View File

@ -1388,8 +1388,8 @@ const game = new Phaser.Game({
pixelArt: false pixelArt: false
}, },
scale: { scale: {
mode: Phaser.Scale.FIT, mode: Phaser.Scale.NONE,
autoCenter: Phaser.Scale.CENTER_HORIZONTALLY, autoCenter: Phaser.Scale.NO_CENTER,
width: WIDTH, width: WIDTH,
height: HEIGHT height: HEIGHT
}, },
@ -1400,7 +1400,7 @@ const game = new Phaser.Game({
}) })
window.__DOLLHOUSE__ = { window.__DOLLHOUSE__ = {
version: '0.10.1', version: '0.10.2',
game, game,
async resetAll() { async resetAll() {
await clearGameState() await clearGameState()

View File

@ -12,9 +12,6 @@ html, body, #app, #game {
margin: 0; margin: 0;
overflow: hidden; overflow: hidden;
} }
#game {
padding-top: clamp(42px, 6vh, 76px);
}
body { body {
min-height: 100dvh; min-height: 100dvh;
overscroll-behavior: none; overscroll-behavior: none;
@ -42,3 +39,14 @@ canvas {
padding: 12px 18px; padding: 12px 18px;
box-shadow: 0 6px 18px rgb(122 61 91 / 24%); box-shadow: 0 6px 18px rgb(122 61 91 / 24%);
} }
#game {
display: flex;
align-items: stretch;
justify-content: center;
}
#game > canvas {
width: 100% !important;
height: 100% !important;
margin: 0 !important;
}