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.

setElevationSectionColor(elevation, color) → boolean

Sets the color list for each floor of the building.

Name
Type
Description

elevation

List of elevations.

color

List of colors.

  • Return

    • true: Setting successful.

    • false: Setting failed.

setFillColor(type, color) → boolean

Sets the color of the Real3D object.

Name
Type
Description

type

boolean

true for changing color in simple rendering mode. false for normal mode.

color

Fill color.

  • Return

    • true: Setting successful.

    • false: Setting failed.

setShaderType(type) → boolean

Sets the display method for building floor colors.

Name
Type
Description

type

number

The output type to set. 0: Texture. 1: Texture + Color. 2: Color.

  • Return

    • true: Setting successful.

    • false: Setting failed.

setStyle(style) → boolean

Sets the style of the building.

Currently, only building color style can be set.

Name
Type
Description

style

The building style to set.

  • Return

    • true: Setting successful.

    • false: Setting failed.

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.

Name
Type
Description

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
Type
Description

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.

Name
Type
Description

visible

boolean

true: Make the object visible. false: Hide the object.

  • Return

    • true: Object visible state.

    • false: Object hidden state.

Last updated