From 5a93ff9c70a25e09d77aff8e9175022b63b3060f Mon Sep 17 00:00:00 2001
From: wangjuncheng <1>
Date: 星期五, 18 七月 2025 10:54:23 +0800
Subject: [PATCH] 1

---
 src/utils/water.js |   23 ++++++++++++++---------
 1 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/src/utils/water.js b/src/utils/water.js
index dff0df4..3d7de0b 100644
--- a/src/utils/water.js
+++ b/src/utils/water.js
@@ -47,7 +47,7 @@
   ];
 
   const levelCount = colorStops.length;
-  const minAllowed = 0.005; // 鏈�灏忓厑璁稿��
+  const minAllowed = 0.05; // 鏈�灏忓厑璁稿��
   const threshold = 1; // 灏忓�间笌澶у�煎垎鐣岀偣
 
   let effectiveMin = Math.max(minFlowRate, minAllowed); // 鏈�灏忎笉鑳藉皬浜� 0.01
@@ -79,22 +79,27 @@
 
   waterLegendData.value = waterHeightLevels;
   // console.log(waterLegendData.value, "鍥句緥鏁版嵁");
-
-
   water = await earthCtrl.simulate.createWaterSimulateLayer({
     baseUrl,
     interval,
     color: SmartEarth.Cesium.Color.fromCssColorString("#D4F2E7"),
     loop: false,
     callback: timeCallback,
-    // alphaByDepth: -0.3,
-    alphaByDepth: -0.8,
+    alphaByDepth: -0.3,
     waterHeightLevels,
     colorRender,
     sizeIndex: 0,
   });
-  // enableWaterArrowFlow(false);
+  //闃叉缂╂斁瀵艰嚧鍦板舰鍙樺姩鍘嬬洊姘撮潰锛屾按闈㈠鍔犺缃�
+  water.clampMinHeight = 0; //鐩告満鐩稿浜庢按闈㈡渶灏忛珮搴�
+  water.clampMaxHeight = 1000; //鐩告満鐩稿浜庢按闈㈡渶澶ч珮搴�
+  water.offsetMinHeight = 0; //姘村亸绉绘渶灏忛珮搴�
+  water.offsetMaxHeight = 100; //姘村亸绉绘渶澶ч珮搴�
+  // 鏄惁寮�鍚澶�
+  enableWaterArrowFlow(false); 
+  // 鏄惁寮�鍚按闈㈤槾褰�
   toggleWaterShadow(false);
+
   // console.log(
   //   `浠跨湡妯℃嫙鍙傛暟锛氳姹傝矾寰� ${baseUrl}, 甯ч棿闂撮殧 ${interval}ms, 鏄惁寮�鍚笓棰樻覆鏌� ${colorRender}`
   // );
@@ -119,12 +124,12 @@
   // console.log("Camera view initialized for water simulation.");
 }
 /**
- * 鏇存柊姘撮鑹�
+ * 鏇存崲姘撮�忔槑搴�
  */
-export function updateWaterColor(color) {
+export function updateWaterColor(color, alpha) {
   if (water) {
     water.color = Cesium.Color.fromCssColorString(color);
-    // console.log("鍒囨崲棰滆壊涓猴細",color);
+    water.alphaByDepth = alpha;
   } else {
     console.warn("No water simulation to pause.");
   }

--
Gitblit v1.9.3