JSTyphoon
API for creating and modifying typhoon objects.
Create a API with Module.createTyphoon.
var object = Module.createTyphoon("id");
Function
create(position, size, alt) → boolean
Sets the position and size of the typhoon object.
size
number
Typhoon width.
alt
number
Typhoon height.
Return
true: Creation successful.
false: Creation failed.
createbyJson(options) → object
Creates a typhoon object.
Passes the typhoon object settings as an argument variable.
Return
.result: API success status (1: Success, 0: Failure)
.name: Operation API name
.return: API return information (object: Normal return value, string: Failure error code)
Sample
Refer to function initPage
getId() → string
Returns the ID of the object.
Return
string: Successful return of the object's Key string.
null: If the object is null.
moveStart()
Starts the typhoon movement.
Moves the typhoon to the latitude and longitude coordinates added to the JSTyphoon API moveList.
Resets to the creation position after the typhoon movement event ends.
Sample
Refer to function moveTyphoon
moveEnd()
Forces the typhoon movement to end.
Resets to the creation position after forcing the typhoon movement to end.
Sample
Refer to function stopTyphoon
moveList(list)
Sets the latitude and longitude for typhoon movement.
Sequentially moves to the entered latitude and longitude coordinates.
Sample
Refer to function moveTyphoon
setDamageRange(danger, size, alt, color)
Sets the damage range of the typhoon.
danger
boolean
Set the threat/warning type. true: Set the damage range type to 'Danger' level. false: Sets the damage range type to 'warning' level.
size
number
Damage range.
alt
number
Altitude of range display.
setRotationSpeed(speed)
Sets the rotation speed of the typhoon.
speed
number
Typhoon rotation speed.
Sample
Refer to function setTyphoonSpeed
setSize(radius, alt)
Sets the size of the typhoon.
radius
number
Typhoon radius.
alt
number
Typhoon height.
setSpeed(speed)
Sets the movement speed of the typhoon.
speed
number
Typhoon movement speed.
Sample
Refer to function setTyphoonSpeed
setUnionTerrain(type)
Set whether the typhoon's impact range is combined with the terrain.
type
boolean
true: visualize terrain combination (RTT). false: visualize as a flat polygon.
Sample
Refer to function setDamageRangeDisplay
setTextureURL(url)
Sets the image URL for the typhoon. (The image supports a size of 1024*1024).
url
string
Typhoon image URL.
setVisibleDamageRange(type)
Typhoon impact area visualization option.
Set whether to visualize the typhoon impact area.
type
boolean
true: Visualize the typhoon impact area. false: Hide the typhoon impact area.
Sample
Refer to function setDamageRangeDisplay
Getter / Setter
getDescription(), setDescription(desc) → string
Set a description for the object.
desc
string
Object description string.
Return
string: Successful return of the object's description string.
null: If the object is null.
getName(), setName(name) → string
Sets the name of the object.
name
string
The name to set for the object.
Return
string: Successful return of the object's name.
null: If the object is null.
getVisible(), setVisible(visible) → boolean
Sets the visibility state of an object.
visible
boolean
true: Make the object visible. false: Hide the object.
Return
true: Object visible state.
false: Object hidden state.
Type Definitions
JSTyphoon.CreateOptions
Typhoon object creation options.
id
string
Typhoon ID.
size
number
optional
500
Typhoon visualization size.
height
number
optional
100
Typhoon visualization height.
complete
function
optional
Callback function when typhoon movement is complete.
JSTyphoon.CreateOptions.Damage
Typhoon impact range object creation options.
size
number
optional
500
Impact range visualization size (in meters).
altitude
number
optional
10
Impact range visualization altitude (in meters).
unionterrain
boolean
optional
false
Whether the impact range visualization combines with the terrain.
Last updated