new ov.FluidModule()
流體模組
Members
-
absHeight
-
Properties:
Name Type Description absHeightNumber 流體高度是否為絕對高度(2D only, 3D固定為絕對高度)。
-
arrowLengthScale
-
Properties:
Name Type Description arrowLengthScaleNumber 流體長度倍率
-
arrowScale
-
Properties:
Name Type Description arrowScaleNumber 流體箭頭大小倍率
-
fadeOpacity
-
Properties:
Name Type Description fadeOpacityNumber 褪色參數,不透明度每禎減少量(1/255),Ex:設定為5的話每個粒子將存活51禎(2D only)。
-
lift
-
Properties:
Name Type Description liftNumber 流體高度。
-
maxSpeed
-
Properties:
Name Type Description maxSpeedNumber 速度最大值,影響顏色分布。
-
minSpeed
-
Properties:
Name Type Description minSpeedNumber 速度最小值,速度低於此值將會被過濾掉。
-
mode
-
Properties:
Name Type Description modeov.FLUID_MODE 流體模式(只對3D有用)。
-
play
-
播放
Properties:
Name Type Description playBoolean 播放
-
playingInfo
-
播放資訊
Properties:
Name Type Description playingInfoObject 播放資訊
Properties
Name Type Description IsPlayingBoolean 是否正在播放
PlayIndexNumber 播放到第幾筆資料
TimeDate 目前時間
PlayingDateArray.<Date> 播放時間源,目前時間位於這兩筆播放時間源之間
TimeSpanArray.<Date> 播放起訖時間
PlayingRatioNumber 播放時間比例,目前時間在回傳的兩筆播放時間源之間的比例(0~1.0)
-
playTime
-
播放時間
Properties:
Name Type Description playTimeDate 播放時間
-
speedFactor
-
Properties:
Name Type Description speedFactorNumber 流體移動速度參數。
-
zScale
-
Properties:
Name Type Description zScaleNumber ZScale值,1為不改變,越小則流體越接近攝影機,用以防止Z Fighting。
Methods
-
addSectionalPlane(setting){ov.SectionalPlaneEntity}
webgl/module/fluidModule/ov-FluidModule.js, line 345 -
新增裁切面工具
Name Type Description settingObject 參數物件。
Name Type Default Description sourceArray.<Float32Array> 資料位置。
boundaryGeoBoundary 範圍。
heightNumber 資料高。
widthNumber 資料寬。
dateArray.<Date> 資料時間,長度需與source相同。
useStepLayeredColorMapBoolean false optional 使用分層設色。
layeredColorMapKeyArray.<Number> optional 分層設色圖高度表。
layeredColorMapValueArray.<ov.Color> optional 分層設色圖顏色表。
flipYBoolean false optional 資料源是否翻轉Y軸。
Returns:
Type Description ov.SectionalPlaneEntity 切面工具物件。 -
getAllSectionalPlanes(SectionalPlaneEntity)
webgl/module/fluidModule/ov-FluidModule.js, line 361 -
取得以建立的所有裁切面工具
Name Type Description SectionalPlaneEntityov.SectionalPlaneEntity 裁切面工具。
-
getFluidSpeed(pos){GeoPoint}
webgl/module/fluidModule/ov-FluidModule.js, line 303 -
取得指定位置流體速度
Name Type Description posGeoPoint 指定位置,4326座標系統。
Returns:
Type Description GeoPoint 流體速度,若超出範圍或未設定流體速度資料來源則回傳null。 -
release()
webgl/module/fluidModule/ov-FluidModule.js, line 294 -
釋放流體資源
-
removeFluidData()
webgl/module/fluidModule/ov-FluidModule.js, line 287 -
移除流體資料
-
removeSectionalPlane(SectionalPlaneEntity)
webgl/module/fluidModule/ov-FluidModule.js, line 353 -
移除裁切面工具
Name Type Description SectionalPlaneEntityov.SectionalPlaneEntity 裁切面工具。
-
setFluidDataByParam(setting)
webgl/module/fluidModule/ov-FluidModule.js, line 242 -
設定流體資料
Name Type Description settingObject 參數物件。
Name Type Default Description boundaryGeoBoundary 所在經緯度。
imageUint8Array | Image | Array.<Uint8Array> | Array.<Image> 流體加密圖。
heightNumber 資料高。
widthNumber 資料寬。
depthNumber 1 optional 資料深(3D only)。
uMaxNumber | Array.<Number> 橫軸速度最大值。
uMinNumber | Array.<Number> 橫軸速度最大值。
vMaxNumber | Array.<Number> 縱軸速度最大值。
vMinNumber | Array.<Number> 縱軸速度最大值。
zMaxNumber | Array.<Number> optional 深度軸速度最大值(3D only)。
zMinNumber | Array.<Number> optional 深度軸速度最大值(3D only)。
is3DBoolean true optional 是否為3D,僅在圖台以WebGL2開啟時有效。
flipYBoolean false optional 資料是否翻轉縱軸。
flipZBoolean false optional 資料是否翻轉深度軸。(3D only)
maxSpeedNumber 30 optional 速度最大值,影響顏色分布。
minSpeedNumber 0 optional 速度最小值,用於過濾。
pointSizeNumber 1 optional 速度最大值,影響流體軌跡大小。
layeredColorMapKeyArray.<Number> optional 分層設色圖高度表。
layeredColorMapValueArray.<ov.Color> optional 分層設色圖顏色表。
liftNumber 3000 optional 流體高度。
lineSegNumber 8 optional 線段節點數,最大8最小2。(3D only)
centerGeo3DPoint optional 3D精細模式中心點,僅支援經緯座標和高度。
offsetArray.<Number> [0, 1, 0, 1, 0, 1] optional 3D精細模式範圍,依序為從3D精細模式中心點再給予東西方向西界、東西方向範圍、南北方向南界、南北方向範圍、高度方向下界、高度方向範圍。
absHeightBoolean true optional 流體高度是否為絕對高度。(2D only)
particleNumberNumber 4096 optional 粒子數量。
fadeOpacityNumber 13 optional 褪色參數,不透明度每禎減少量(1/255),預設參數下給個流體粒子將存活20禎。(2D only)
speedFactorNumber 0.25 optional 流體移動速度參數。
dropRateNumber 0.003 optional 流體重制隨機位置機率。
magFilterString "NEAREST" optional 貼圖放大採樣方式,NEAREST或是LINEAR。(2D only)
minFilterString "NEAREST" optional 貼圖縮小採樣方式,NEAREST/LINEAR/NEAREST_MIPMAP_NEAREST/LINEAR_MIPMAP_NEAREST/NEAREST_MIPMAP_LINEAR/LINEAR_MIPMAP_LINEAR。(2D only)
zScaleNumber 0.999997 optional ZScale值,1為不改變,越小則流體越接近攝影機,用以防止Z Fighting。(2D only)
dateArray.<Date> optional 資料時間。
startDateIndexNumber 0 optional 播放開始時間索引。
endDateIndexNumber optional 播放最終時間索引。
-
setFluidDataByUVData(setting)
webgl/module/fluidModule/ov-FluidModule.js, line 280 -
設定流體資料
Name Type Description settingObject 參數物件。
Name Type Default Description boundaryGeoBoundary 所在經緯度。
uDataArray.<Number> | Array.<Array.<Number>> 橫軸流體速度(向東為正)。
vDataArray.<Number> | Array.<Array.<Number>> 縱軸流體速度(向北為正)。
zDataArray.<Number> | Array.<Array.<Number>> optional 上下軸流體速度(向上為正)。
heightNumber 資料高。
widthNumber 資料寬。
depthNumber 1 optional 資料深(3D only)。
is3DBoolean true optional 是否為3D,僅在圖台以WebGL2開啟時有效。
flipYBoolean false optional 資料是否翻轉縱軸。
flipZBoolean false optional 資料是否翻轉深度軸。(3D only)
maxSpeedNumber optional 速度最大值,影響顏色分布,若沒設定將會自動依照uData與vData計算。
minSpeedNumber 0 optional 速度最小值,用於過濾。
pointSizeNumber 1 optional 速度最大值,影響流體軌跡大小。
layeredColorMapKeyArray.<Number> optional 分層設色圖高度表。
layeredColorMapValueArray.<ov.Color> optional 分層設色圖顏色表。
liftNumber 3000 optional 流體高度。
lineSegNumber 8 optional 線段節點數,最大8最小2。(3D only)
centerGeo3DPoint optional 3D精細模式中心點,僅支援經緯座標和高度。
offsetArray.<Number> [0, 1, 0, 1, 0, 1] optional 3D精細模式範圍,依序為從3D精細模式中心點再給予東西方向西界、東西方向範圍、南北方向南界、南北方向範圍、高度方向下界、高度方向範圍。
absHeightBoolean true optional 流體高度是否為絕對高度。(2D only)
particleNumberNumber 4096 optional 粒子數量。
fadeOpacityNumber 13 optional 褪色參數,影響尾巴長度,不透明度每禎減少量(1/255),預設參數下給個流體粒子將存活20禎。(2D only)
speedFactorNumber 0.25 optional 流體移動速度參數。
dropRateNumber 0.003 optional 流體重制隨機位置機率。
magFilterString "NEAREST" optional 貼圖放大採樣方式,NEAREST或是LINEAR。(2D only)
minFilterString "NEAREST" optional 貼圖縮小採樣方式,NEAREST/LINEAR/NEAREST_MIPMAP_NEAREST/LINEAR_MIPMAP_NEAREST/NEAREST_MIPMAP_LINEAR/LINEAR_MIPMAP_LINEAR。(2D only)
zScaleNumber 0.999997 optional ZScale值,1為不改變,越小則流體越接近攝影機,用以防止Z Fighting。(2D only)
dateArray.<Date> optional 資料時間。
startDateIndexNumber 0 optional 播放開始時間索引。
endDateIndexNumber optional 播放最終時間索引。
-
setMagFilter(Filter)
webgl/module/fluidModule/ov-FluidModule.js, line 311 -
設定貼圖放大採樣方式(2D only)
Name Type Description FilterString 貼圖放大採樣方式,NEAREST或是LINEAR。
-
setMaskViewport(Viewport)
webgl/module/fluidModule/ov-FluidModule.js, line 327 -
設定貼圖縮小採樣方式
Name Type Description ViewportCRect 設定貼圖大小,影響最後解析度,預設為new CRect(0, 0, 4096, 2048),超過會影響效能,且若寬高不為2的pow則無法產生Mipmap。
-
setMinFilter(Filter)
webgl/module/fluidModule/ov-FluidModule.js, line 319 -
設定貼圖縮小採樣方式(2D only)
Name Type Description FilterString 貼圖縮小採樣方式,NEAREST/LINEAR/NEAREST_MIPMAP_NEAREST/LINEAR_MIPMAP_NEAREST/NEAREST_MIPMAP_LINEAR/LINEAR_MIPMAP_LINEAR。