From cf7752d995e09d48eca9a1ca5634a9e71ae46553 Mon Sep 17 00:00:00 2001 From: wangjuncheng <1> Date: 星期二, 22 七月 2025 16:19:06 +0800 Subject: [PATCH] 透明度0 修改模型数据路径 --- src/utils/water.js | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/utils/water.js b/src/utils/water.js index 4338630..aac2480 100644 --- a/src/utils/water.js +++ b/src/utils/water.js @@ -79,21 +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, 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}` // ); @@ -120,7 +126,7 @@ /** * 鏇存崲姘撮�忔槑搴� */ -export function updateWaterColor(color,alpha) { +export function updateWaterColor(color, alpha) { if (water) { water.color = Cesium.Color.fromCssColorString(color); water.alphaByDepth = alpha; -- Gitblit v1.9.3