snakes final, devnet

This commit is contained in:
Sewmina 2025-04-14 17:16:22 +05:30
parent 9fd962ea9a
commit c5b8d6ceea
4 changed files with 8 additions and 4 deletions

View File

@ -87,7 +87,7 @@
// config.matchWebGLToCanvasSize = false;
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
// Mobile device style: fill the whole browser client area with the game canvas:
// Mobile device style: set canvas to 80% of screen size to account for iframe padding
var meta = document.createElement('meta');
meta.name = 'viewport';
@ -96,11 +96,13 @@
container.className = "unity-mobile";
canvas.className = "unity-mobile";
// Set canvas size to 80% of viewport dimensions
canvas.style.height = "80vh";
// To lower canvas resolution on mobile devices to gain some
// performance, uncomment the following line:
// config.devicePixelRatio = 1;
} else {
// Desktop style: Render the game canvas in a window that can be maximized to fullscreen:

View File

@ -87,7 +87,7 @@
// config.matchWebGLToCanvasSize = false;
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
// Mobile device style: fill the whole browser client area with the game canvas:
// Mobile device style: set canvas to 80% of screen size to account for iframe padding
var meta = document.createElement('meta');
meta.name = 'viewport';
@ -96,11 +96,13 @@
container.className = "unity-mobile";
canvas.className = "unity-mobile";
// Set canvas size to 80% of viewport dimensions
canvas.style.height = "80vh";
// To lower canvas resolution on mobile devices to gain some
// performance, uncomment the following line:
// config.devicePixelRatio = 1;
} else {
// Desktop style: Render the game canvas in a window that can be maximized to fullscreen: