|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en-us"> |
| 3 | + <head> |
| 4 | + <meta charset="utf-8"> |
| 5 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 7 | + |
| 8 | + <!--Google material symbols--> |
| 9 | + <link |
| 10 | + href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined" |
| 11 | + rel="stylesheet" |
| 12 | +/> |
| 13 | + |
| 14 | +<!--Pixel Font--> |
| 15 | +<link rel="preconnect" href="https://fonts.googleapis.com"> |
| 16 | +<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> |
| 17 | +<link href=" https://fonts.googleapis.com/css2?family=Pixelify+Sans:[email protected]&display=swap" rel=" stylesheet" > |
| 18 | + |
| 19 | + <title>Chuck N' Cheese</title> |
| 20 | + <link rel="shortcut icon" href="../assets/favicon.ico"> |
| 21 | + <link rel="stylesheet" href="TemplateData/style.css"> |
| 22 | + <link rel="stylesheet" href="PizzaWarrior.css"> |
| 23 | + <script src="Authorization.js"></script> |
| 24 | + </head> |
| 25 | + <body> |
| 26 | + |
| 27 | + <div class = rotation>Please Rotate Or Resize The Screen Into Landscape Mode. <br> |
| 28 | + <span class="material-symbols-outlined" style= "font-size: 3rem;"> |
| 29 | + sync |
| 30 | + </span> |
| 31 | + </div> |
| 32 | + |
| 33 | + <div id="unity-container" class="unity-desktop"> |
| 34 | + <canvas id="unity-canvas"></canvas> |
| 35 | + <div id="unity-loading-bar"> |
| 36 | + <div id="unity-logo"></div> |
| 37 | + <div id="unity-progress-bar-empty"> |
| 38 | + <div id="unity-progress-bar-full"></div> |
| 39 | + </div> |
| 40 | + </div> |
| 41 | + <div id="unity-warning"> </div> |
| 42 | + <div id="unity-footer"> |
| 43 | + </div> |
| 44 | + </div> |
| 45 | + <script> |
| 46 | + var canvas = document.querySelector("#unity-canvas"); |
| 47 | + |
| 48 | + // Shows a temporary message banner/ribbon for a few seconds, or |
| 49 | + // a permanent error message on top of the canvas if type=='error'. |
| 50 | + // If type=='warning', a yellow highlight color is used. |
| 51 | + // Modify or remove this function to customize the visually presented |
| 52 | + // way that non-critical warnings and error messages are presented to the |
| 53 | + // user. |
| 54 | + function unityShowBanner(msg, type) { |
| 55 | + var warningBanner = document.querySelector("#unity-warning"); |
| 56 | + function updateBannerVisibility() { |
| 57 | + warningBanner.style.display = warningBanner.children.length ? 'block' : 'none'; |
| 58 | + } |
| 59 | + var div = document.createElement('div'); |
| 60 | + div.innerHTML = msg; |
| 61 | + warningBanner.appendChild(div); |
| 62 | + if (type == 'error') div.style = 'background: red; padding: 10px;'; |
| 63 | + else { |
| 64 | + if (type == 'warning') div.style = 'background: yellow; padding: 10px;'; |
| 65 | + setTimeout(function() { |
| 66 | + warningBanner.removeChild(div); |
| 67 | + updateBannerVisibility(); |
| 68 | + }, 5000); |
| 69 | + } |
| 70 | + updateBannerVisibility(); |
| 71 | + } |
| 72 | + |
| 73 | + var buildUrl = "Build"; |
| 74 | + var loaderUrl = buildUrl + "/Builds.loader.js"; |
| 75 | + var config = { |
| 76 | + arguments: [], |
| 77 | + dataUrl: buildUrl + "/Builds.data", |
| 78 | + frameworkUrl: buildUrl + "/Builds.framework.js", |
| 79 | + codeUrl: buildUrl + "/Builds.wasm", |
| 80 | + streamingAssetsUrl: "StreamingAssets", |
| 81 | + companyName: "DefaultCompany", |
| 82 | + productName: "Pizza Warrior", |
| 83 | + productVersion: "0.1", |
| 84 | + //showBanner: unityShowBanner, |
| 85 | + }; |
| 86 | + |
| 87 | + // By default, Unity keeps WebGL canvas render target size matched with |
| 88 | + // the DOM size of the canvas element (scaled by window.devicePixelRatio) |
| 89 | + // Set this to false if you want to decouple this synchronization from |
| 90 | + // happening inside the engine, and you would instead like to size up |
| 91 | + // the canvas DOM size and WebGL render target sizes yourself. |
| 92 | + // config.matchWebGLToCanvasSize = false; |
| 93 | + |
| 94 | + // If you would like all file writes inside Unity Application.persistentDataPath |
| 95 | + // directory to automatically persist so that the contents are remembered when |
| 96 | + // the user revisits the site the next time, uncomment the following line: |
| 97 | + // config.autoSyncPersistentDataPath = true; |
| 98 | + // This autosyncing is currently not the default behavior to avoid regressing |
| 99 | + // existing user projects that might rely on the earlier manual |
| 100 | + // JS_FileSystem_Sync() behavior, but in future Unity version, this will be |
| 101 | + // expected to change. |
| 102 | + |
| 103 | + if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) { |
| 104 | + // Mobile device style: fill the whole browser client area with the game canvas: |
| 105 | + |
| 106 | + var meta = document.createElement('meta'); |
| 107 | + meta.name = 'viewport'; |
| 108 | + meta.content = 'width=device-width, height=device-height, initial-scale=1.0, user-scalable=no, shrink-to-fit=yes'; |
| 109 | + document.getElementsByTagName('head')[0].appendChild(meta); |
| 110 | + document.querySelector("#unity-container").className = "unity-mobile"; |
| 111 | + canvas.className = "unity-mobile"; |
| 112 | + |
| 113 | + // To lower canvas resolution on mobile devices to gain some |
| 114 | + // performance, uncomment the following line: |
| 115 | + // config.devicePixelRatio = 1; |
| 116 | + |
| 117 | + |
| 118 | + } else { |
| 119 | + // Desktop style: Render the game canvas in a window that can be maximized to fullscreen: |
| 120 | + canvas.style.width = "100vw"; |
| 121 | + canvas.style.height = "100vh"; |
| 122 | + } |
| 123 | + |
| 124 | + //document.querySelector("#unity-loading-bar").style.display = "block"; |
| 125 | + |
| 126 | + var script = document.createElement("script"); |
| 127 | + script.src = loaderUrl; |
| 128 | + script.onload = () => { |
| 129 | + createUnityInstance(canvas, config, (progress) => { |
| 130 | + //document.querySelector("#unity-progress-bar-full").style.width = 100 * progress + "%"; |
| 131 | + }).then((unityInstance) => { |
| 132 | + document.querySelector("#unity-loading-bar").style.display = "none"; |
| 133 | + // document.querySelector("#unity-fullscreen-button").onclick = () => { |
| 134 | + // unityInstance.SetFullscreen(1); |
| 135 | + // }; |
| 136 | + |
| 137 | + }).catch((message) => { |
| 138 | + alert(message); |
| 139 | + }); |
| 140 | + }; |
| 141 | + |
| 142 | + document.body.appendChild(script); |
| 143 | + |
| 144 | + </script> |
| 145 | + </body> |
| 146 | +</html> |
0 commit comments