JSColorPolygon
API for creating and modifying gradient polygon objects.
Create a API with Module.createColorPolygon.
var colorPolygon = Module.createColorPolygon("ID");
Function
getId() → string
Returns the Key of the object.
Return
string: Successful return of the object's Key string.
null: If the object is null.
SetVerticalPlane(coordinates, parts, height, startColor, endColor) → boolean
Creates a vertical wall polygon object.
Object is configured with parameter.
height
number
Height of the polygon.
Return
true : Object creation successful.
false : Object creation failed.
failure condition.
No components in the entered coordinates or the number of vertices is less than 2.
No components in the entered parts or less than 1 part.
Sample
Refer to function createVerticalPlane.
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 : Option setting successful.
false : Option setting failed.
Sample
Refer to function createVerticalPlane.
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.
Last updated