| | |
| | | * @param {boolean} options.colorRender - 是否启用颜色渲染 |
| | | */ |
| | | export function createWaterPrimitive(options = {}) { |
| | | const { baseUrl = "/simu/c2h1dc", interval = 1000, colorRender = true } = options; |
| | | const { |
| | | baseUrl = "/simu/c2h1dc", |
| | | interval = 1000, |
| | | colorRender = true, |
| | | } = options; |
| | | |
| | | water = earthCtrl.simulate.createWaterSimulateLayer({ |
| | | baseUrl, |
| | |
| | | { height: 4.0, color: "#feb652" }, |
| | | { height: 5.0, color: "#fd7f06" }, |
| | | { height: 10.0, color: "#fe2b07" }, |
| | | { height: 30.0, color: "#4d0a08" }, |
| | | ], |
| | | colorRender, // 控制是否启用颜色渲染 |
| | | }); |
| | | |
| | | console.log(`仿真模拟参数: 请求路径 ${baseUrl}, 帧间间隔 ${interval}ms, 是否开启专题渲染 ${colorRender}`); |
| | | console.log( |
| | | `仿真模拟参数: 请求路径 ${baseUrl}, 帧间间隔 ${interval}ms, 是否开启专题渲染 ${colorRender}` |
| | | ); |
| | | } |
| | | /** |
| | | * 初始化水体模拟视图 |
| | |
| | | return; |
| | | } |
| | | // const idx = Math.floor(Math.random() * imageList.length); //随机索引跳转,实际中用不到,只用作演示 |
| | | // console.log(`Jumping to timestamp: count:[${imageList.length}], index:[${closestIndex}]`); |
| | | console.log( |
| | | `Jumping to timestamp: count:[${imageList.length}], index:[${closestIndex}]` |
| | | ); |
| | | water.setTime(imageList[closestIndex]); |
| | | } else { |
| | | console.warn("No water simulation to set time for."); |
| | |
| | | */ |
| | | function timeCallback(timeStamp) { |
| | | // console.log(`Current timestamp: ${timeStamp}`); |
| | | } |
| | | } |