shaogen1995 3 tygodni temu
rodzic
commit
f47b7ba127

BIN
public/unityMo/Build/Build.data.unityweb


BIN
public/unityMo/Build/Build.framework.js.unityweb


Plik diff jest za duży
+ 1 - 1
public/unityMo/Build/Build.loader.js


BIN
public/unityMo/Build/Build.wasm.unityweb


BIN
public/unityMo/StreamingAssets/aa/WebGL/089c7ab93c27a929ecb0cbb575f4147c.bundle


BIN
public/unityMo/StreamingAssets/aa/WebGL/f1791d0a6f5c2c029b608731c7e720bd.bundle


BIN
public/unityMo/StreamingAssets/aa/catalog.bin


+ 1 - 1
public/unityMo/StreamingAssets/aa/catalog.hash

@@ -1 +1 @@
-751682cd4e991e86f598c29c3f55b8a5
+958ec67bcb94090d954ef97cd60d083d

Plik diff jest za duży
+ 1 - 1
public/unityMo/StreamingAssets/aa/settings.json


+ 5 - 0
public/unityMo/export_main.js

@@ -35,6 +35,11 @@ window.loadScene = function (sceneName) {
     window.onCancelDownload();
 }
 
+//设置懒惰模式, 设置后所有动画将会暂停, 切换场景不会重置, 所以在不需要懒惰模式的时候必须要切换回来, 默认为false
+window.setLazyMode = function (isLazyMode) {
+    window.unityInstance.SendMessage('SceneLoader', 'SetLazyMode', isLazyMode ? 1 : 0)
+}
+
 //是否正在加载场景
 window.isLoadingScene = function () {
     return isLoadingScene

+ 1 - 1
public/unityMo/index.html

@@ -66,7 +66,7 @@
         frameworkUrl: buildUrl + "/Build.framework.js.unityweb",
         codeUrl: buildUrl + "/Build.wasm.unityweb",
         streamingAssetsUrl: "StreamingAssets",
-        devicePixelRatio: 2,
+        devicePixelRatio: 1,
         companyName: "FDage",
         productName: "Chenzhebei-ShanxiMuseum",
         productVersion: "0.1",

BIN
public/unityPc/Build/Build.data.unityweb


BIN
public/unityPc/Build/Build.framework.js.unityweb


Plik diff jest za duży
+ 1 - 1
public/unityPc/Build/Build.loader.js


BIN
public/unityPc/Build/Build.wasm.unityweb


BIN
public/unityPc/StreamingAssets/aa/WebGL/089c7ab93c27a929ecb0cbb575f4147c.bundle


BIN
public/unityPc/StreamingAssets/aa/catalog.bin


+ 1 - 1
public/unityPc/StreamingAssets/aa/catalog.hash

@@ -1 +1 @@
-69f93f75b6fe967b5f46a11f86e35afa
+a9b29854fdc52059e5415a9caf1e0ba1

Plik diff jest za duży
+ 1 - 1
public/unityPc/StreamingAssets/aa/settings.json


+ 5 - 0
public/unityPc/export_main.js

@@ -35,6 +35,11 @@ window.loadScene = function (sceneName) {
     window.onCancelDownload();
 }
 
+//设置懒惰模式, 设置后所有动画将会暂停, 切换场景不会重置, 所以在不需要懒惰模式的时候必须要切换回来, 默认为false
+window.setLazyMode = function (isLazyMode) {
+    window.unityInstance.SendMessage('SceneLoader', 'SetLazyMode', isLazyMode ? 1 : 0)
+}
+
 //是否正在加载场景
 window.isLoadingScene = function () {
     return isLoadingScene

+ 2 - 2
src/pages/A0base/data.ts

@@ -1,6 +1,6 @@
 import store from '@/store'
 import { callIframeFu } from '@/utils/history'
-import { isPc } from '@/utils/http'
+import { envFlag, isPc } from '@/utils/http'
 
 // 获取unityDom
 const getUnityDomFu = () => {
@@ -13,7 +13,7 @@ export const lodingUnityFu = () => {
   const modalIframe = getUnityDomFu()
   if (modalIframe) {
     modalIframe.style.display = 'block'
-    modalIframe.src = `unity${isPc ? 'Pc' : 'Mo'}/index.html`
+    modalIframe.src = `unity${envFlag ? 'Pc' : isPc ? 'Pc' : 'Mo'}/index.html`
   }
 }
 

+ 14 - 2
src/pages/A6ybwx/index.tsx

@@ -11,6 +11,7 @@ import Skip from '@/components/Skip'
 import { domDelOwnFu } from '@/utils/utilsSome'
 import { cutUnityFu, getUnityKey } from '../A0base/data'
 import Zloding from '@/components/Zloding'
+import { callIframeFu } from '@/utils/history'
 
 function A6ybwx() {
   // 开场视频-------------
@@ -34,6 +35,17 @@ function A6ybwx() {
 
   const [gotoTab, setGotoTab] = useState(0)
 
+  useEffect(() => {
+    if (gotoTab !== 0) {
+      // 停止动画
+      callIframeFu('setLazyMode', 1)
+    } else {
+      // 恢复动画
+      callIframeFu('setLazyMode', 0)
+    }
+    // console.log('xxxxxxx', gotoTab)
+  }, [gotoTab])
+
   window.onClickMainHotspot = (hotspotName: string) => {
     console.log('调用了onClickMainHotspot', hotspotName)
 
@@ -79,7 +91,7 @@ function A6ybwx() {
         domDelOwnFu('.videoBox')
       }, 100)
       // 切换场景
-      cutUnityFu('RoomScene', () => { })
+      cutUnityFu('RoomScene', () => {})
     }
   }, [isEnter])
 
@@ -137,7 +149,7 @@ function A6ybwx() {
       {gotoTab === 3 && <SangzangHome setGotoTab={setGotoTab} />}
 
       {/* 进度条 */}
-      <Zloding isShow={isEnter && lodingScene} bacNum={2}/>
+      <Zloding isShow={isEnter && lodingScene} bacNum={2} />
     </div>
   )
 }

+ 10 - 1
src/pages/A9knowlege/index.tsx

@@ -8,6 +8,15 @@ import { echPageBackFu } from '@/components/MenuSider/data'
 import Zback from '@/components/Zback'
 
 function A9knowlege() {
+  // 是否显示返回按钮
+  const [backShow, setBackShow] = useState(false)
+
+  useEffect(() => {
+    if (!window.location.href.includes('?l=look')) {
+      setBackShow(true)
+    }
+  }, [])
+
   const echartRef = useRef<HTMLDivElement | null>(null)
   const chartInstance = useRef<any>(null)
   const [detail, setDetail] = useState<any>(null)
@@ -130,7 +139,7 @@ function A9knowlege() {
 
   return (
     <div className={styles.A9knowlege}>
-      <Zback clickFu={() => echPageBackFu()} />
+      {backShow ? <Zback clickFu={() => echPageBackFu()} /> : null}
 
       <div className={styles.main}>
         <div id='echart-container' ref={echartRef} />