Ver código fonte

Merge branch 'master' of http://192.168.0.115:3000/lanxin/Chengzhebei

lanxin 3 semanas atrás
pai
commit
eea6534a4e

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


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


Diferenças do arquivo suprimidas por serem muito extensas
+ 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/4d0b6aa8264949a568c452d2c79d8312.bundle


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


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

@@ -1 +1 @@
-958ec67bcb94090d954ef97cd60d083d
+b977dfca9190d0f1dcc655c4789324a5

+ 5 - 0
public/unityMo/export_main.js

@@ -40,6 +40,11 @@ window.setLazyMode = function (isLazyMode) {
     window.unityInstance.SendMessage('SceneLoader', 'SetLazyMode', isLazyMode ? 1 : 0)
 }
 
+//设置程序时间倍率, float类型, 为0是静止, 为1是正常速度
+window.setUnityTimeScale = function (timeScale) {
+    window.unityInstance.SendMessage('SceneLoader', 'SetTimeScale', timeScale)
+}
+
 //是否正在加载场景
 window.isLoadingScene = function () {
     return isLoadingScene

+ 4 - 2
public/unityMo/index.html

@@ -1,5 +1,6 @@
 <!DOCTYPE html>
 <html lang="zh-CN">
+
 <head>
     <meta charset="utf-8">
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -12,6 +13,7 @@
     <script src="./export_roomScene.js"></script>
     <script src="./export_drawingBoard.js"></script>
 </head>
+
 <body>
     <div id="unity-container">
         <canvas id="unity-canvas" width=960 height=600 tabindex="-1"></canvas>
@@ -96,7 +98,7 @@
 
 
 
-loadingBar.style.display = "block";
+    loadingBar.style.display = "block";
     var script = document.createElement("script");
     script.src = loaderUrl;
     script.onload = () => {
@@ -119,4 +121,4 @@ loadingBar.style.display = "block";
     document.body.appendChild(script);
 </script>
 
-</html>
+</html>

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


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


Diferenças do arquivo suprimidas por serem muito extensas
+ 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/WebGL/4d0b6aa8264949a568c452d2c79d8312.bundle


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


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

@@ -1 +1 @@
-a9b29854fdc52059e5415a9caf1e0ba1
+e008853a118f37db8c721b717204c33d

+ 5 - 0
public/unityPc/export_main.js

@@ -40,6 +40,11 @@ window.setLazyMode = function (isLazyMode) {
     window.unityInstance.SendMessage('SceneLoader', 'SetLazyMode', isLazyMode ? 1 : 0)
 }
 
+//设置程序时间倍率, float类型, 为0是静止, 为1是正常速度
+window.setUnityTimeScale = function (timeScale) {
+    window.unityInstance.SendMessage('SceneLoader', 'SetTimeScale', timeScale)
+}
+
 //是否正在加载场景
 window.isLoadingScene = function () {
     return isLoadingScene

+ 2 - 0
src/pages/A6ybwx/Sangzang/components/Policy/index.tsx

@@ -38,6 +38,8 @@ function Policy({ setShowTab }: { setShowTab: (tab: number) => void }) {
 
   // 处理滚轮事件
   const handleWheel = (e: any) => {
+    console.log('xxxxxx', originRef.current)
+
     if (originRef.current) {
       originRef.current.scrollLeft += e.deltaY
     }

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

@@ -38,10 +38,12 @@ function A6ybwx() {
   useEffect(() => {
     if (gotoTab !== 0) {
       // 停止动画
-      callIframeFu('setLazyMode', 1)
+      callIframeFu('setLazyMode', true)
+      callIframeFu('setUnityTimeScale', 0)
     } else {
       // 恢复动画
-      callIframeFu('setLazyMode', 0)
+      callIframeFu('setLazyMode', false)
+      callIframeFu('setUnityTimeScale', 1)
     }
     // console.log('xxxxxxx', gotoTab)
   }, [gotoTab])

+ 43 - 8
src/pages/A9knowlege/index.tsx

@@ -91,9 +91,18 @@ function A9knowlege() {
             max: 3
           },
           label: { position: 'right' },
-          emphasis: { focus: 'adjacency' },
+          focusNodeAdjacency: true,
+          emphasis: {
+            focus: 'adjacency',
+            lineStyle: {
+              width: 3,
+              opacity: 1
+            }
+          },
           force: { repulsion: 200, edgeLength: [50, 120] },
-          lineStyle: { color: 'source', curveness: 0.2 }
+          lineStyle: { color: 'source', curveness: 0.2 },
+          edgeLabel: { show: false },
+          edgeSymbol: ['none', 'none']
         }
       ]
     }
@@ -107,15 +116,41 @@ function A9knowlege() {
     myChart.on('click', function (params: any) {
       if (!params || !params.data) return
 
-      // 高亮相关节点连线
+      // 取消所有高亮
       myChart.dispatchAction({
-        type: 'highlight',
-        dataIndex: params.dataIndex
+        type: 'downplay'
       })
 
-      const node = params.data
-      if (node && node.raw && node.raw.type) {
-        setDetail(node.raw)
+      if (params.dataType === 'edge') {
+        const edge = params.data
+        const sourceIndex = graph.nodes.findIndex((n: any) => n.id === edge.source)
+        const targetIndex = graph.nodes.findIndex((n: any) => n.id === edge.target)
+
+        if (sourceIndex !== -1 && targetIndex !== -1) {
+          // 高亮源节点
+          myChart.dispatchAction({
+            type: 'highlight',
+            dataIndex: sourceIndex
+          })
+          // 高亮目标节点
+          setTimeout(() => {
+            myChart.dispatchAction({
+              type: 'highlight',
+              dataIndex: targetIndex
+            })
+          }, 10)
+        }
+      } else {
+        // 点击的是节点
+        myChart.dispatchAction({
+          type: 'highlight',
+          dataIndex: params.dataIndex
+        })
+
+        const node = params.data
+        if (node && node.raw && node.raw.type) {
+          setDetail(node.raw)
+        }
       }
     })
     const resizeHandler = () => myChart.resize()