| | |
| | | import { cartesianToXY } from "@/utils/map"; |
| | | import { useSimStore } from "@/store/simulation"; |
| | | import { storeToRefs } from "pinia"; |
| | | const simStore = useSimStore(); |
| | |
| | | colorRender, |
| | | sizeIndex: 0, |
| | | }); |
| | | enableWaterArrowFlow(true); |
| | | enableWaterArrowFlow(false); |
| | | toggleWaterShadow(false); |
| | | console.log( |
| | | `仿真模拟参数:请求路径 ${baseUrl}, 帧间间隔 ${interval}ms, 是否开启专题渲染 ${colorRender}` |
| | |
| | | viewer.scene.camera.flyTo(view); |
| | | // console.log("Camera view initialized for water simulation."); |
| | | } |
| | | |
| | | /** |
| | | * 更新水颜色 |
| | | */ |
| | | export function updateWaterColor(color) { |
| | | if (water) { |
| | | water.color = Cesium.Color.fromCssColorString(color); |
| | | console.log("切换颜色为:",color); |
| | | } else { |
| | | console.warn("No water simulation to pause."); |
| | | } |
| | | } |
| | | /** |
| | | * 暂停水体模拟 |
| | | */ |
| | |
| | | */ |
| | | export function enableWaterArrowFlow(enabled) { |
| | | if (water) { |
| | | water.arrowEnabled = enabled; // 假设 SDK 支持此属性 |
| | | // 默认关闭状态 |
| | | water.flowEnabled = enabled; // 假设 SDK 支持此属性 |
| | | console.log(`箭头流向动画已${enabled ? "开启" : "关闭"}`); |
| | | } else { |
| | | console.warn("未找到水体模拟图层,请先启动洪水模拟"); |