JSReal3D
API for creating and modifying Real3D objects.
Create a API with Module.createReal3D.
Real3D is an object that outputs 3D building shapes.
var object = Module.createReal3D("ID");Function
getId() → string
Returns the ID of the object.
- Return - string: Successful return of the object's Key string. 
- null: If the object is null. 
 
lat strKey = object.getId();setElevationSectionColor(elevation, color) → boolean
Sets the color list for each floor of the building.
- Return - true: Setting successful. 
- false: Setting failed. 
 
var elevationList = new Module.Collection();
//.. add elevation values ..
var colorList = new Module.Collection();
//.. add color values ..
object.setElevationSectionColor(elevationList, colorList);setFillColor(type, color) → boolean
Sets the color of the Real3D object.
type
boolean
true for changing color in simple rendering mode. false for normal mode.
- Return - true: Setting successful. 
- false: Setting failed. 
 
setShaderType(type) → boolean
Sets the display method for building floor colors.
type
number
The output type to set. 0: Texture. 1: Texture + Color. 2: Color.
- Return - true: Setting successful. 
- false: Setting failed. 
 
object.setShaderType(1);setStyle(style) → boolean
Sets the style of the building.
Currently, only building color style can be set.
- Return - true: Setting successful. 
- false: Setting failed. 
 
var polyStyle = new Module.JSPolygonStyle();
polyStyle.setFill(true);
polyStyle.setFillColor(new Module.JSColor(255, 255, 0, 0));
//...
object.setStyle(polyStyle);getFillColor() → JSColor
Returns the color of the Real3D object.
- Return - JSColor: Successfully returns the object's color. 
- null: Color return failed. 
 
getPosition() → JSVector3D
Returns the central latitude and longitude coordinates of the Real3D object.
- Return - JSVector3D: Returns the centroid coordinates (longitude, latitude, altitude) of the Real3D object successfully. 
- null: Coordinate return failed. 
 
getHeight() → number
Returns the height of the 3D model itself.
- Return - number : Height of object (in meters). 
 
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. 
 
var strDesc = object.getDescription();
// ... or ...
object.setDescription("First Object.");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. 
 
var objName = object.getName();
// ... or ...
object.setName("MyObject");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. 
 
var objName = object.getName();
// ... or ...
object.setVisible(true);Last updated
