| | |
| | | colorRender, // 控制是否启用颜色渲染 |
| | | }); |
| | | |
| | | console.log(`Water simulation started with baseUrl: ${baseUrl}, interval: ${interval}ms, colorRender: ${colorRender}`); |
| | | console.log(`仿真模拟参数: 请求路径 ${baseUrl}, 帧间间隔 ${interval}ms, 是否开启专题渲染 ${colorRender}`); |
| | | } |
| | | /** |
| | | * 初始化水体模拟视图 |
| | |
| | | }, |
| | | }; |
| | | viewer.scene.camera.flyTo(view); |
| | | console.log("Camera view initialized for water simulation."); |
| | | // console.log("Camera view initialized for water simulation."); |
| | | } |
| | | |
| | | /** |
| | |
| | | export function pauseWaterSimulation() { |
| | | if (water) { |
| | | water.pause(); |
| | | console.log("Water simulation paused."); |
| | | console.log("暂停仿真"); |
| | | } else { |
| | | console.warn("No water simulation to pause."); |
| | | } |
| | |
| | | export function resumeWaterSimulation() { |
| | | if (water) { |
| | | water.resume(); |
| | | console.log("Water simulation resumed."); |
| | | console.log("继续仿真"); |
| | | } else { |
| | | console.warn("No water simulation to resume."); |
| | | } |
| | |
| | | console.warn("No timestamps available for water simulation."); |
| | | return; |
| | | } |
| | | |
| | | const idx = Math.floor(Math.random() * imageList.length); |
| | | console.log(`Jumping to timestamp: count:[${imageList.length}], index:[${closestIndex}]`); |
| | | // const idx = Math.floor(Math.random() * imageList.length); //随机索引跳转,实际中用不到,只用作演示 |
| | | // console.log(`Jumping to timestamp: count:[${imageList.length}], index:[${closestIndex}]`); |
| | | water.setTime(imageList[closestIndex]); |
| | | } else { |
| | | console.warn("No water simulation to set time for."); |
| | |
| | | export function toggleWaterColorRender(enabled) { |
| | | if (water) { |
| | | water.colorRender = enabled; |
| | | console.log(`Water color render set to: ${enabled}`); |
| | | console.log(`是否开启专题渲染 ${enabled}`); |
| | | } else { |
| | | console.warn("No water simulation to toggle color rendering."); |
| | | } |