JSFlow
API for creating and setting wind flow effects.
Create a API with Module.getFlow.
Refer to JSFlow.FlowDataOption for parameters.
let flow = Module.getFlow();
Function
ClearFlowData()
Initializes wind field data.
Type Definitions
JSFlow.FlowDataOption
Wind data parameters.
JSFlow.FlowDataOption.dataParam
Data fields configuration.
url
string
URL of the wind field file.
dem
optional
Parses the height.txt file in the wind field analysis file root and downloads it in advance for use.
JSFlow.FlowDataOption.dataParam.dem
Float Array data converted from DEM information in height.txt.
cols
number
Number of horizontal cells in DEM.
rows
number
Number of vertical cells in DEM.
size
number
Resolution of the DEM (in meters).
llcorner
string
Bottom left coordinate of the DEM (GRS80 TM central, 600,000).
data
array
DEM data.
JSFlow.FlowDataOption.dataParam.dem.llcorner
Bottom left coordinate of the DEM (GRS80 TM central, 600,000).
left
number
x coordinate of the DEM starting point.
lower
number
y coordinate of the DEM starting point.
projCord
number
Size of the DEM projection data (fixed at 20).
JSFlow.FlowDataOption.optionParam
Initial data settings.
velocity
number
Scale of wind field particle movement speed.
offsetHeight
number
Height of wind field particles (based on sea level if no DEM, otherwise surface level).
maxParticle
number
Maximum number of particles that can be displayed on the screen (recommended below 5000).
minLifeTime
number
Minimum lifetime of particles.
maxLifeTime
number
Maximum lifetime of particles ( maxLifeTime > LifeTime > minLifeTime ).
JSFlow.FlowDataOption.legendParam
Methods to apply wind speed legends and represent trajectories with gradients.
Wind speed legends
maxIndex
number
Used for trajectory representation (fixed at 255 for wind speed legends).
Trajectory representation
maxIndex
number
Scale of wind field particle movement speed.
JSFlow.FlowDataOption.legendParam.fixValue
Array for using wind speed based legends.
Lists the colors for each legend expressed with value and color (applies the color of color for wind speeds below value).
value
number
Wind speed for the legend.
color
array
Color settings for the legend. Composed of r, g, b.
JSFlow.FlowDataOption.legendParam.band
Array for representing wind field trajectories.
The entire trajectory is divided into maxIndex sections, with colors specified for each section through startIndex/endIndex.
The start-end color information listed in the array is represented in a gradient form.
Example) start: red, end: white. white ------------> red
startIndex
number
Table Index for the start part of the section to reflect (tail).
startColor
array
Color setting for the tail. Composed of r, g, b.
endIndex
number
Table Index for the end part of the section to reflect (head).
endColor
array
Color setting for the head. Composed of r, g, b.
Last updated