huangxingxing 1 anno fa
parent
commit
63638602d6

+ 4 - 4
src/views/home/config.js

@@ -16,11 +16,11 @@ function unityShowBanner(msg, type) {
     updateBannerVisibility();
   }
   var buildUrl = "static/Build";
-  var loaderUrl = "static/Build/BuildFast.loader.js";
+  var loaderUrl = "static/Build/Build.loader.js";
 export const config = {
-    dataUrl: buildUrl + "/BuildFast.data",
-    frameworkUrl: buildUrl + "/BuildFast.framework.js",
-    codeUrl: buildUrl + "/BuildFast.wasm",
+    dataUrl: buildUrl + "/Build.data",
+    frameworkUrl: buildUrl + "/Build.framework.js",
+    codeUrl: buildUrl + "/Build.wasm",
     streamingAssetsUrl: "StreamingAssets",
     companyName: "DefaultCompany",
     productName: "CollierySafety",

+ 21 - 7
src/views/home/home.vue

@@ -66,11 +66,11 @@ onMounted(() => {
       // }
 
       var buildUrl = "static/Build";
-       var loaderUrl = buildUrl + "/BuildFast.loader.js";
+       var loaderUrl = buildUrl + "/Build.loader.js";
       // var config = {
-      //   dataUrl: buildUrl + "/BuildFast.data",
-      //   frameworkUrl: buildUrl + "/BuildFast.framework.js",
-      //   codeUrl: buildUrl + "/BuildFast.wasm",
+      //   dataUrl: buildUrl + "/Build.data",
+      //   frameworkUrl: buildUrl + "/Build.framework.js",
+      //   codeUrl: buildUrl + "/Build.wasm",
       //   streamingAssetsUrl: "StreamingAssets",
       //   companyName: "DefaultCompany",
       //   productName: "CollierySafety",
@@ -116,8 +116,22 @@ onMounted(() => {
  * lv 水深
  */
 function changeWater(lv){
-  console.log(lv)
-    window.postMessage('changeWater:'+lv);
+  console.log("changeWater"+lv)
+    // window.postMessage('changeWater:'+lv);
+    window.postMessage('changeWater:0.2');
+     window.postMessage('ChangeFire:0');
+       window.postMessage('ChangeLaneHeight:4');
+}
+
+/**
+ * lv 火灾
+ */
+function changeFire(lv){
+  console.log("changeFire"+lv)
+    // window.postMessage('changeWater:'+lv);
+    window.postMessage('changeWater:0');
+    window.postMessage('changeFire:1');
+    window.postMessage('ChangeLaneHeight:4');
 }
 /**
  * lv 0 1
@@ -133,7 +147,7 @@ watch(
     changeCamera(newVal[0])
     changeWater(newVal[1])
     console.log(1111111);
-  console.log(newVal[0],newVal[1])
+    console.log(newVal[0],newVal[1])
     // if (newVal[0] == '') {
     //   htmldialogshow.value = true;
 

+ 31 - 18
src/views/home/index.vue

@@ -65,11 +65,11 @@ onMounted(() => {
       }
 
       var buildUrl = "static/Build";
-       var loaderUrl = buildUrl + "/BuildFast.loader.js";
+       var loaderUrl = buildUrl + "/Build.loader.js";
       var config = {
-        dataUrl: buildUrl + "/BuildFast.data",
-        frameworkUrl: buildUrl + "/BuildFast.framework.js",
-        codeUrl: buildUrl + "/BuildFast.wasm",
+        dataUrl: buildUrl + "/Build.data",
+        frameworkUrl: buildUrl + "/Build.framework.js",
+        codeUrl: buildUrl + "/Build.wasm",
         streamingAssetsUrl: "StreamingAssets",
         companyName: "DefaultCompany",
         productName: "CollierySafety",
@@ -106,24 +106,44 @@ onMounted(() => {
         });
       };
       document.body.appendChild(script);
-
-
-
 });
 
 /**
  * lv 水深
  */
 function changeWater(lv){
-  console.log(lv)
-    window.postMessage('changeWater:'+lv);
+  console.log("changeWater"+lv)
+    // window.postMessage('changeWater:'+lv);
+    window.postMessage('changeWater:0.3');
+     window.postMessage('changeFire:0');
+       window.postMessage('changeLaneHeight:4');
+}
+
+/**
+ * lv 温度
+ */
+function changeFire(lv){
+  console.log("changeFire"+lv)
+  if(lv<=25){
+    window.postMessage('changeFire:0');
+  }else if(lv>25&lv<=160){
+    window.postMessage('changeFire:1');
+  }else if(lv>160&lv<=290){
+    window.postMessage('changeFire:2');
+  }else if(lv>290){
+      window.postMessage('changeFire:3');
+  }
+    // window.postMessage('changeWater:'+lv);
+    window.postMessage('changeWater:0');
+    window.postMessage('changeFire:1');
+    window.postMessage('changeLaneHeight:4');
 }
 /**
  * lv 0 1
  */
 function changeCamera(lv){
   console.log(lv)
-     window.postMessage('changeCamera:'+lv);
+  window.postMessage('changeCamera:'+lv);
 }
 
 watch(
@@ -131,14 +151,7 @@ watch(
   (newVal, oldVal) => {
     changeCamera(newVal[0])
     changeWater(newVal[1])
-    console.log(1111111);
-  console.log(newVal[0],newVal[1])
-    // if (newVal[0] == '') {
-    //   htmldialogshow.value = true;
-
-    // } else {
-    //   htmldialogshow.value = false;
-    // }
+    console.log(newVal[0],newVal[1])
   },
   { deep: true }
 );

BIN
static/Build/BuildFast.data → static/Build/Build.data


File diff suppressed because it is too large
+ 0 - 0
static/Build/Build.framework.js


+ 0 - 0
static/Build/BuildFast.loader.js → static/Build/Build.loader.js


BIN
static/Build/BuildFast.wasm → static/Build/Build.wasm


+ 4 - 4
static/ServiceWorker.js

@@ -1,9 +1,9 @@
 const cacheName = "DefaultCompany-CollierySafety-0.1.0";
 const contentToCache = [
-    "Build/BuildFast.loader.js",
-    "Build/BuildFast.framework.js",
-    "Build/BuildFast.data",
-    "Build/BuildFast.wasm",
+    "Build/Build.loader.js",
+    "Build/Build.framework.js",
+    "Build/Build.data",
+    "Build/Build.wasm",
     "TemplateData/style.css"
 
 ];

+ 4 - 4
static/index.html

@@ -57,11 +57,11 @@
       }
 
       var buildUrl = "Build";
-      var loaderUrl = buildUrl + "/BuildFast.loader.js";
+      var loaderUrl = buildUrl + "/Build.loader.js";
       var config = {
-        dataUrl: buildUrl + "/BuildFast.data",
-        frameworkUrl: buildUrl + "/BuildFast.framework.js",
-        codeUrl: buildUrl + "/BuildFast.wasm",
+        dataUrl: buildUrl + "/Build.data",
+        frameworkUrl: buildUrl + "/Build.framework.js",
+        codeUrl: buildUrl + "/Build.wasm",
         streamingAssetsUrl: "StreamingAssets",
         companyName: "DefaultCompany",
         productName: "CollierySafety",

+ 0 - 33
static/js/ServiceWorker.js

@@ -1,33 +0,0 @@
-const cacheName = "DefaultCompany-CollierySafety-0.1.0";
-const contentToCache = [
-    "Build/Build.loader.js",
-    "Build/Build.framework.js",
-    "Build/Build.data",
-    "Build/Build.wasm",
-    "TemplateData/style.css"
-
-];
-
-self.addEventListener('install', function (e) {
-    console.log('[Service Worker] Install');
-    
-    e.waitUntil((async function () {
-      const cache = await caches.open(cacheName);
-      console.log('[Service Worker] Caching all: app shell and content');
-      await cache.addAll(contentToCache);
-    })());
-});
-
-self.addEventListener('fetch', function (e) {
-    e.respondWith((async function () {
-      let response = await caches.match(e.request);
-      console.log(`[Service Worker] Fetching resource: ${e.request.url}`);
-      if (response) { return response; }
-
-      response = await fetch(e.request);
-      const cache = await caches.open(cacheName);
-      console.log(`[Service Worker] Caching new resource: ${e.request.url}`);
-      cache.put(e.request, response.clone());
-      return response;
-    })());
-});

Some files were not shown because too many files changed in this diff