diff --git a/Build/Build/c1ac39c2807bce9c7f9071edf08b1ab0.data.gz b/Build/Build/d1e2d1e3e120229ced20d8237eae353c.data.gz similarity index 99% rename from Build/Build/c1ac39c2807bce9c7f9071edf08b1ab0.data.gz rename to Build/Build/d1e2d1e3e120229ced20d8237eae353c.data.gz index 94a57c8..9b486ee 100644 Binary files a/Build/Build/c1ac39c2807bce9c7f9071edf08b1ab0.data.gz and b/Build/Build/d1e2d1e3e120229ced20d8237eae353c.data.gz differ diff --git a/Build/ServiceWorker.js b/Build/ServiceWorker.js index cc3c0f7..3cf7e0e 100644 --- a/Build/ServiceWorker.js +++ b/Build/ServiceWorker.js @@ -2,7 +2,7 @@ const cacheName = "DefaultCompany-运动伤害现场急救虚拟仿真实验-0.1 const contentToCache = [ "Build/7a2dbded24d57e056180125b1583e7c4.loader.js", "Build/62981e01aece13a94bac539c85228c75.framework.js.gz", - "Build/c1ac39c2807bce9c7f9071edf08b1ab0.data.gz", + "Build/d1e2d1e3e120229ced20d8237eae353c.data.gz", "Build/e89ebbd31642308ad16cecffa889584e.wasm.gz", "TemplateData/style.css" diff --git a/Build/index.html b/Build/index.html index 5a580b2..2fad02c 100644 --- a/Build/index.html +++ b/Build/index.html @@ -59,7 +59,7 @@ var buildUrl = "Build"; var loaderUrl = buildUrl + "/7a2dbded24d57e056180125b1583e7c4.loader.js"; var config = { - dataUrl: buildUrl + "/c1ac39c2807bce9c7f9071edf08b1ab0.data.gz", + dataUrl: buildUrl + "/d1e2d1e3e120229ced20d8237eae353c.data.gz", frameworkUrl: buildUrl + "/62981e01aece13a94bac539c85228c75.framework.js.gz", codeUrl: buildUrl + "/e89ebbd31642308ad16cecffa889584e.wasm.gz", streamingAssetsUrl: "StreamingAssets", @@ -75,6 +75,7 @@ } return "must-revalidate"; }; + config.devicePixelRatio = Math.min(window.devicePixelRatio || 1, 1.5); // By default Unity keeps WebGL canvas render target size matched with // the DOM size of the canvas element (scaled by window.devicePixelRatio) diff --git a/Build/server.js b/Build/server.js index b48702d..7d2f9eb 100644 --- a/Build/server.js +++ b/Build/server.js @@ -117,6 +117,32 @@ function serveIndex(res) { // 注入到 之前的 CSS const css = ` `; // 注入到 最前面的 overlay @@ -176,10 +238,14 @@ function serveIndex(res) {

运动伤害现场急救虚拟仿真实验

VIRTUAL SIMULATION EXPERIMENT

- +
+
+
+
加载中 0%

点击按钮进入全屏沉浸式实验环境

`; @@ -188,8 +254,25 @@ function serveIndex(res) { `; + html = html.replace( + /progressBarFull\.style\.width\s*=\s*100\s*\*\s*progress\s*\+\s*"%";/, + 'progressBarFull.style.width = 100 * progress + "%"; if (window.__landingSetProgress) window.__landingSetProgress(progress);' + ); + if (!html.includes('config.cacheControl')) { + html = html.replace( + /showBanner:\s*unityShowBanner,\s*\n\s*};/, + 'showBanner: unityShowBanner,\n };\n\n config.cacheControl = function (url) {\n if (url === config.dataUrl || url === config.frameworkUrl || url === config.codeUrl) {\n return "immutable";\n }\n return "must-revalidate";\n };' + ); + } + if (!html.includes('config.devicePixelRatio')) { + html = html.replace( + /};\s*\n\s*\/\/ By default Unity keeps WebGL canvas render target size matched with/, + '};\n config.devicePixelRatio = Math.min(window.devicePixelRatio || 1, 1.5);\n\n // By default Unity keeps WebGL canvas render target size matched with' + ); + } + html = html.replace( + /loadingBar\.style\.display\s*=\s*"none";/, + 'if (window.__landingSetReady) window.__landingSetReady(); loadingBar.style.display = "none";' + ); + html = html.replace('', css + '\n'); html = html.replace('', '\n' + overlay); html = html.replace('', js + '\n'); diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset index 6238eb7..ce7f712 100644 --- a/ProjectSettings/QualitySettings.asset +++ b/ProjectSettings/QualitySettings.asset @@ -4,7 +4,7 @@ QualitySettings: m_ObjectHideFlags: 0 serializedVersion: 5 - m_CurrentQuality: 2 + m_CurrentQuality: 0 m_QualitySettings: - serializedVersion: 2 name: Performant @@ -129,7 +129,7 @@ QualitySettings: Server: 0 Stadia: 2 Standalone: 2 - WebGL: 1 + WebGL: 0 Windows Store Apps: 2 XboxOne: 2 iPhone: 1