snakes final, devnet
This commit is contained in:
parent
9fd962ea9a
commit
c5b8d6ceea
Binary file not shown.
Binary file not shown.
|
|
@ -87,7 +87,7 @@
|
||||||
// config.matchWebGLToCanvasSize = false;
|
// config.matchWebGLToCanvasSize = false;
|
||||||
|
|
||||||
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
|
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');
|
var meta = document.createElement('meta');
|
||||||
meta.name = 'viewport';
|
meta.name = 'viewport';
|
||||||
|
|
@ -96,11 +96,13 @@
|
||||||
container.className = "unity-mobile";
|
container.className = "unity-mobile";
|
||||||
canvas.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
|
// To lower canvas resolution on mobile devices to gain some
|
||||||
// performance, uncomment the following line:
|
// performance, uncomment the following line:
|
||||||
// config.devicePixelRatio = 1;
|
// config.devicePixelRatio = 1;
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Desktop style: Render the game canvas in a window that can be maximized to fullscreen:
|
// Desktop style: Render the game canvas in a window that can be maximized to fullscreen:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@
|
||||||
// config.matchWebGLToCanvasSize = false;
|
// config.matchWebGLToCanvasSize = false;
|
||||||
|
|
||||||
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
|
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');
|
var meta = document.createElement('meta');
|
||||||
meta.name = 'viewport';
|
meta.name = 'viewport';
|
||||||
|
|
@ -96,11 +96,13 @@
|
||||||
container.className = "unity-mobile";
|
container.className = "unity-mobile";
|
||||||
canvas.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
|
// To lower canvas resolution on mobile devices to gain some
|
||||||
// performance, uncomment the following line:
|
// performance, uncomment the following line:
|
||||||
// config.devicePixelRatio = 1;
|
// config.devicePixelRatio = 1;
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Desktop style: Render the game canvas in a window that can be maximized to fullscreen:
|
// Desktop style: Render the game canvas in a window that can be maximized to fullscreen:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user