diff --git a/frontend/src/css/main.css b/frontend/src/css/main.css index d16531f315094d8ccb538da59e8dbaf66f13cf68..2ca97a6b3e1230c81e684ecd67c4912af331550d 100644 --- a/frontend/src/css/main.css +++ b/frontend/src/css/main.css @@ -1,8 +1,7 @@ /* ¯\_(ツ)_/¯ */ -#gioco { - width: 100%; - height: 100%; - position: absolute; - background-color: black; +body { + width: 100vw; + height: 100vh; + margin: 0; } diff --git a/frontend/src/index.html b/frontend/src/index.html index 1d1fd67586c6e8132f408c664db80e0a7be001f3..70a0ec4e3d3023feb011d12ddfce063fea44dc47 100644 --- a/frontend/src/index.html +++ b/frontend/src/index.html @@ -5,12 +5,11 @@ <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="css/main.css" rel="stylesheet"> + <script src="js/main.js" charset="utf-8"></script> <title>Ötzi App</title> </head> <body> - <script src="js/main.js" charset="utf-8"></script> - <div id="gioco"></div> </body> </html> \ No newline at end of file diff --git a/frontend/src/js/main.js b/frontend/src/js/main.js index 48533cbeed71d922e6e5e0eba34a49e8f4515a2e..d6621e2576afc1caee6421daedf801c350028963 100644 --- a/frontend/src/js/main.js +++ b/frontend/src/js/main.js @@ -8,13 +8,11 @@ const backendEndpointURL = (endpoint) => let config = { type: Phaser.AUTO, + width: 1200, + height: 800, pixelArt: true, - - backgroundColor: "#000", - scale: { - parent: "gioco", - mode: Phaser.Scale.SHOW_ALL, - }, + autoCenter: Phaser.Scale.CENTER_BOTH, + scaleMode: Phaser.Scale.FIT, physics: { default: "arcade", arcade: {