FloodByEntityEx

FloodByEntityEx

new FloodByEntityEx(viewer, optionsopt)

用Polygon来模拟淹没分析效果的类

Parameters:
Name Type Attributes Description
viewer Viewer

要分析的场景对象

options Object <optional>

带有以下属性的对象:

Properties
Name Type Attributes Description
height Number <optional>

当前淹没高度

maximumHeight Number <optional>

最大淹没高度

speed Number <optional>

淹没速度,单位米/秒

positions Number <optional>

淹没范围

onChange function <optional>

淹没更新回调,每次淹没高度改变时都会执行此回调,回调参数为当前淹没高度

onStart function <optional>

淹没开始回调

onEnd function <optional>

淹没完成回调

style Object <optional>

polygon的style

Properties
Name Type Attributes Default Description
color Object <optional>
"#1cbbb4"

polygon的颜色

opacity Object <optional>

polygon的透明度

Methods

clear()

清除淹没效果

destroy()

销毁对象

setOptions(options)

设置底高,顶高, 速度

Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Description
height Number <optional>

底高

maxHeight Number <optional>

顶高

speed Number <optional>

速度

start(resetopt)

开始模拟

Parameters:
Name Type Attributes Default Description
reset Boolean <optional>
true

是否清空以前的结果,重新模拟

stop()

暂停,停止