JSFlowPolygon
API for creating and modifying water flow effect polygon objects.
Create a API with Module.createFlowPolygon.
let flowPolygon = Module.createFlowPolygon("ID");
Properties
opacity
number
Opacity.
fluid_activity
number
Degree of fluid fluctuation.
flow_speed
number
Flow speed.
image_type
number
Surface image display type. 0: Display with specified image. 1: Display wind flow direction legend as color. 3: Display with terrain texture buffer. Otherwise, display with the color specified by color.
Function
createGrid(options) → object
Creates a grid object.
Return
Object with "result" attribute: Object creation successful.
Object with "error" attribute: Object creation failed.
Failure conditions.
If the "vertex" attribute is missing in options.
If the "index" attribute is missing in options.
If the "normaltexture" attribute is missing or the texture image is not valid.
If grid object creation failed.
If setting the "waterlevel" attribute failed.
createWall(options) → object
Creates a vertical wall polygon object.
Object is set with options variable.
Return
Object with "result" attribute: Object creation successful.
Object with "error" attribute: Object creation failed.
Failure conditions.
If the "vertex" attribute is missing in options.
If the "normaltexture" attribute is missing or the texture image is not valid.
setCullMode(type) → boolean
Sets the culling option for the vertical wall polygon.
The culling option based on the input value of type is 0(both sides), 1(both sides), 2(CW), 3(CCW).
The initial culling option setting is 3.
type
number
Polygon culling mode.
Return
true: Object option setting successful.
false: Object option setting failed.
Type Definitions
JSFlowPolygon.GridDataOption
Grid information parameters.
index
array(number)
List of index coordinates forming the grid.
waterlevel
number
optional
0.0
Water level.
JSFlowPolygon.WallDataOption
Wall information parameters.
height
number
optional
10.0
Wall height.
JSFlowPolygon.positionOffset
longitude
number
0.0
Longitude.
latitude
number
0.0
Latitude.
altitude
number
0.0
Altitude.
Last updated