### Initialize and Bind Atmosphere Parameters - TypeScript Source: https://openglobus.github.io/docs/control_atmosphere_AtmosphereConfig Initializes various atmosphere parameters and binds them to corresponding UI elements. If a planet object exists, it populates these parameters with values from the planet's atmosphere settings. This code snippet demonstrates data binding and initial state setup for atmospheric properties. ```typescript this._rayleighScatteringCoefficientC.appendTo(this.$rayleighScatteringCoefficientC!); this._ozoneAbsorptionCoefficientA.appendTo(this.$ozoneAbsorptionCoefficientA!); this._ozoneAbsorptionCoefficientB.appendTo(this.$ozoneAbsorptionCoefficientB!); this._ozoneAbsorptionCoefficientC.appendTo(this.$ozoneAbsorptionCoefficientC!); this._sunAngularRadius.appendTo(this.$sunAngularRadius!); this._sunIntensity.appendTo(this.$sunIntensity!); this._groundAlbedo.appendTo(this.$groundAlbedo!); this._ozoneDensityHeight.appendTo(this.$ozoneDensityHeight!); this._ozoneDensityWide.appendTo(this.$ozoneDensityWide!); if (this.planet) { this._parameters = this.planet.atmosphereControl.parameters; this._height.value = this._parameters.ATMOS_HEIGHT; this._rayleight.value = this._parameters.RAYLEIGH_SCALE; this._mie.value = this._parameters.MIE_SCALE; this._bottomRadius.value = this._parameters.BOTTOM_RADIUS; this._mieScatteringCoefficient.value = this._parameters.mieScatteringCoefficient; this._mieExtinctionCoefficient.value = this._parameters.mieExtinctionCoefficient; this._rayleighScatteringCoefficientA.value = this._parameters.rayleighScatteringCoefficient_0; this._rayleighScatteringCoefficientB.value = this._parameters.rayleighScatteringCoefficient_1; this._rayleighScatteringCoefficientC.value = this._parameters.rayleighScatteringCoefficient_2; this._ozoneAbsorptionCoefficientA.value = this._parameters.ozoneAbsorptionCoefficient_0; this._ozoneAbsorptionCoefficientB.value = this._parameters.ozoneAbsorptionCoefficient_1; this._ozoneAbsorptionCoefficientC.value = this._parameters.ozoneAbsorptionCoefficient_2; this._sunAngularRadius.value = this._parameters.SUN_ANGULAR_RADIUS; this._sunIntensity.value = this._parameters.SUN_INTENSITY; this._groundAlbedo.value = this._parameters.GROUND_ALBEDO; this._ozoneDensityHeight.value = this._parameters.ozoneDensityHeight; this._ozoneDensityWide.value = this._parameters.ozoneDensityWide; } ``` -------------------------------- ### Get Billboard Visibility (TypeScript) Source: https://openglobus.github.io/docs/entity_BaseBillboard Returns the current visibility state of the billboard. ```typescript public getVisibility(): boolean { return this._visibility; } ``` -------------------------------- ### BaseBillboard Constructor Source: https://openglobus.github.io/docs/BaseBillboard Initializes a new BaseBillboard instance with optional configuration options. ```APIDOC ## BaseBillboard Constructor ### Description Initializes a new BaseBillboard instance with optional configuration options. ### Method Constructor ### Endpoint N/A (Class Constructor) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **options** (Object) - Optional - Configuration options for the billboard. - **position** (Vec3 | Array.) - Optional - Billboard position. - **rotation** (number) - Optional - Screen angle rotation. - **color** (Vec4 | string | Array.) - Optional - Billboard color. - **alignedAxis** (Vec3 | Array.) - Optional - Billboard aligned vector. - **offset** (Vec3 | Array.) - Optional - Billboard center screen offset. - **visibility** (boolean) - Optional - Visibility. ### Request Example ```json { "options": { "position": [10, 20, 30], "rotation": 0.5, "color": [1, 0, 0, 1], "visibility": true } } ``` ### Response #### Success Response (200) N/A (Constructor does not return a value directly, it initializes the object) #### Response Example N/A ``` -------------------------------- ### TouchNavigation Constructor Source: https://openglobus.github.io/docs/TouchNavigation Initializes a new instance of TouchNavigation with optional parameters. ```APIDOC ## new TouchNavigation(options) ### Description Constructs a new TouchNavigation object. ### Method `new` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **options** (ITouchNavigationParams) - Optional - Touch navigation options. - **inertia** (number) - Optional - Inertia factor. Default is 0.007. - **minSlope** (number) - Optional - Minimal slope for vertical camera movement. Default is 0.1. - **jerkLimit** (number) - Optional - Limit for touch jerk speed to prevent unexpected camera movement. Default is 0.08. ### Request Example ```json { "inertia": 0.007, "minSlope": 0.1, "jerkLimit": 0.08 } ``` ### Response #### Success Response (200) None (Constructor does not return a response body) #### Response Example None ``` -------------------------------- ### Get Billboard Aligned Axis (TypeScript) Source: https://openglobus.github.io/docs/entity_BaseBillboard Returns the current aligned axis vector (Vec3) of the billboard. ```typescript public getAlignedAxis(): Vec3 { return this._alignedAxis; } ``` -------------------------------- ### Planet Constructor Source: https://openglobus.github.io/docs/Planet Initializes a new instance of the Planet class. This constructor sets up the planet with various customizable options. ```APIDOC ## new Planet() ### Description Initializes a new instance of the Planet class. ### Method Constructor ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "example": "new Planet({ options })" } ``` ### Response #### Success Response (200) N/A (Constructor) #### Response Example N/A (Constructor) ### Parameters Detail - **options.name** (string) - Optional - Planet name (Earth by default) - **options.ellipsoid** (Ellipsoid) - Optional - Planet ellipsoid (WGS84 by default) - **options.maxGridSize** (Number) - Optional - Segment maximal grid size (128 by default) - **options.maxEqualZoomAltitude** (Number) - Optional - Maximal altitude since segments on the screen become the same zoom level (15000000.0 by default) - **options.minEqualZoomAltitude** (Number) - Optional - Minimal altitude since segments on the screen become the same zoom level (10000.0 by default) - **options.minEqualZoomCameraSlope** (Number) - Optional - Minimal camera slope above the globe where segments on the screen become the same zoom level (0.8 by default) ``` -------------------------------- ### Get Billboard Screen Space Rotation (TypeScript) Source: https://openglobus.github.io/docs/entity_BaseBillboard Retrieves the current screen space rotation of the billboard in radians. ```TypeScript public getRotation(): number { return this._rotation; } ``` -------------------------------- ### Polyline Constructor Source: https://openglobus.github.io/docs/Polyline Initializes a new Polyline object with optional configuration settings. ```APIDOC ## Polyline Constructor ### new Polyline(options) Initializes a new Polyline object. #### Parameters * **options** (Object) - Optional. Configuration for the polyline. * **thickness** (number) - Optional. Thickness in screen pixels. Default is 1.5. * **altitude** (Number) - Optional. Altitude relative to ground layers. * **color** (Vec4) - Optional. RGBA color. * **opacity** (Boolean) - Optional. Line opacity. * **visibility** (Boolean) - Optional. Polyline visibility. Default is true. * **isClosed** (Boolean) - Optional. Indicates if the geometry is closed. * **pathLonLat** (Array.) - Optional. Array of geodetic coordinates. * **path3v** (Array.) - Optional. Array of cartesian coordinates. * **pathColors** (Array.) - Optional. Array of coordinate colors. ``` -------------------------------- ### Get Billboard Position (TypeScript) Source: https://openglobus.github.io/docs/entity_BaseBillboard Retrieves the current 3D position of the billboard. This method returns a Vec3 object representing the Cartesian coordinates. ```TypeScript public getPosition(): Vec3 { return this._position; } ``` -------------------------------- ### Vector Layer Methods Source: https://openglobus.github.io/docs/Vector Documentation for various methods available on the Vector layer instance, including adding entities, managing visibility, and interacting with the planet. ```APIDOC ## add(entity) ### Description Adds a single entity to the vector layer. ### Method `add` ### Endpoint N/A (Instance method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters (Method Arguments) - **entity** (Entity) - The entity to add to the layer. ### Request Example ```javascript const newEntity = new Entity(...); vectorLayer.add(newEntity); ``` ### Response #### Success Response (200) Returns the Vector layer instance for chaining. #### Response Example ```json { "layer": "vectorLayerInstance" } ``` ## addEntities(entities) ### Description Adds an array of entities to the vector layer. ### Method `addEntities` ### Endpoint N/A (Instance method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters (Method Arguments) - **entities** (Array) - An array of entities to add to the layer. ### Request Example ```javascript const newEntities = [new Entity(...), new Entity(...)] vectorLayer.addEntities(newEntities); ``` ### Response #### Success Response (200) Returns the Vector layer instance for chaining. #### Response Example ```json { "layer": "vectorLayerInstance" } ``` ## addTo(planet) ### Description Adds the vector layer to a specified planet instance. ### Method `addTo` ### Endpoint N/A (Instance method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters (Method Arguments) - **planet** (Planet) - The planet scene object to which the layer will be added. ### Request Example ```javascript const myPlanet = new Planet(...); vectorLayer.addTo(myPlanet); ``` ### Response #### Success Response (200) Returns the Vector layer instance for chaining. #### Response Example ```json { "layer": "vectorLayerInstance" } ``` ## abortMaterialLoading(material) ### Description Aborts the loading process for a specific material associated with the layer. ### Method `abortMaterialLoading` ### Endpoint N/A (Instance method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters (Method Arguments) - **material** (Material) - The material whose loading process should be aborted. ### Request Example ```javascript const materialToAbort = getMaterial(...); vectorLayer.abortMaterialLoading(materialToAbort); ``` ### Response #### Success Response (200) Indicates that the material loading has been aborted. #### Response Example ```json { "status": "aborted" } ``` ``` -------------------------------- ### Get Billboard Screen Space Offset (TypeScript) Source: https://openglobus.github.io/docs/entity_BaseBillboard Retrieves the current screen space offset of the billboard. Returns a Vec3 object representing the offset in x, y, and z. ```TypeScript public getOffset(): Vec3 { return this._offset; } ``` -------------------------------- ### Get Billboard RGBA Color (TypeScript) Source: https://openglobus.github.io/docs/entity_BaseBillboard Retrieves the current RGBA color of the billboard. Returns a Vec4 object representing the color channels (red, green, blue, alpha). ```TypeScript public getColor(): Vec4 { return this._color; } ``` -------------------------------- ### TouchNavigation Methods Source: https://openglobus.github.io/docs/TouchNavigation Methods available for controlling the TouchNavigation. ```APIDOC ## TouchNavigation Methods ### activate() ### Description Activates the control. ### Method `activate` ### Endpoint N/A (Method call) ### Parameters None ### Request Example N/A ### Response #### Success Response (200) None #### Response Example None --- ### deactivate() ### Description Deactivates the control. ### Method `deactivate` ### Endpoint N/A (Method call) ### Parameters None ### Request Example N/A ### Response #### Success Response (200) None #### Response Example None --- ### isActive() ### Description Checks if the control is active. ### Method `isActive` ### Endpoint N/A (Method call) ### Parameters None ### Request Example N/A ### Response #### Success Response (200) - **isActive** (boolean) - True if the control is active, false otherwise. #### Response Example ```json { "isActive": true } ``` --- ### addTo(renderer) ### Description Assigns a renderer to the control. ### Method `addTo` ### Endpoint N/A (Method call) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **renderer** (object) - Required - The renderer to assign. ### Request Example N/A ### Response #### Success Response (200) None #### Response Example None --- ### name() ### Description Returns the name of the control. ### Method `name` ### Endpoint N/A (Method call) ### Parameters None ### Request Example N/A ### Response #### Success Response (200) - **name** (string) - The name of the control. #### Response Example ```json { "name": "TouchNavigation" } ``` ``` -------------------------------- ### Entity Constructor Source: https://openglobus.github.io/docs/Entity Initializes a new Entity instance. Entities can be created manually and added to an entity collection. ```APIDOC ## new Entity(options) ### Description Creates a new Entity instance with optional configuration parameters. ### Method Constructor ### Parameters #### Request Body - **name** (string) - Optional - Name of the entity. - **properties** (any) - Optional - Additional properties of the entity. - **cartesian** (Vec3 | NumberArray3) - Optional - Cartesian position. - **lonlat** (LonLat | NumberArray3 | NumberArray2) - Optional - Geographic coordinates. - **altitude** (number) - Optional - Altitude. - **visibility** (boolean) - Optional - Visibility flag. - **billboard** (Billboard | IBillboardParams) - Optional - Billboard object or parameters. - **label** (Label | ILabelParams) - Optional - Label object or parameters. - **polyline** (Polyline | IPolylineParams) - Optional - Polyline object or parameters. - **ray** (Ray | IRayParams) - Optional - Ray object or parameters. - **pointCloud** (PointCloud | IPointCloudParams) - Optional - Point cloud object or parameters. - **geometry** (Geometry | IGeometryParams) - Optional - Geometry object or parameters. - **geoObject** (GeoObject | IGeoObjectParams) - Optional - Geo object or parameters. - **strip** (Strip | IStripParams) - Optional - Strip object or parameters. - **independentPicking** (boolean) - Optional - Independent picking flag. - **relativePosition** (boolean) - Optional - Parent relative position flag, otherwise position is absolute. - **pitch** (number) - Optional - Rotation around local X-axis in radians. - **yaw** (number) - Optional - Rotation around local Y-axis in radians. - **roll** (number) - Optional - Rotation around local Z-axis in radians. - **scale** (number | Vec3 | NumberArray3) - Optional - Scaling factor. - **forceGlobalPosition** (boolean) - Optional - Forces global position for the entity, making it the same as its parent. - **forceGlobalRotation** (boolean) - Optional - Forces global rotation for the entity, making it the same as its parent. - **forceGlobalScale** (boolean) - Optional - Forces global scale for the entity, making it the same as its parent. ### Request Example ```json { "name": "MyEntity", "cartesian": [100000.0, 200000.0, 300000.0], "visibility": true } ``` ### Response #### Success Response (200) - **Entity** (Entity) - The newly created Entity object. #### Response Example ```json { "id": "some-unique-id", "name": "MyEntity", "visibility": true } ``` ``` -------------------------------- ### GlobusTerrain Constructor Source: https://openglobus.github.io/docs/GlobusTerrain Initializes a new GlobusTerrain instance. This class loads segment elevation data, converts it, and provides it to the planet segment. ```APIDOC ## GlobusTerrain Constructor ### Description Initializes a new GlobusTerrain instance. This class loads segment elevation data, converts it, and provides it to the planet segment. ### Method `new GlobusTerrain(nameopt, optionsopt, gridSizeByZoomopt, heightFactoropt)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters Details - **name** (string, optional) - Terrain provider name. - **options** (IGlobusTerrainParams, optional) - Provider options: - **minZoom** (number, optional) - Minimal visible zoom index when terrain handler works. Default: 3. - **minZoom** (number, optional) - Maximal visible zoom index when terrain handler works. Default: 14. - **minNativeZoom** (number, optional) - Maximal available terrain zoom level. Default: 14. - **url** (string, optional) - Terrain source path url template. Default: "//openglobus.org/heights/srtm3/{z}/{y}/{x}.ddm". - **gridSizeByZoom** (Array., optional) - Array of segment triangulation grid sizes where array index agreed to the segment zoom index. - **plainGridSize** (number, optional) - Elevation grid size. Default: 32. Must be power of two. - **responseType** (string, optional) - Response type. Default: "arraybuffer". - **MAX_LOADING_TILES** (number, optional) - Maximum at one time loading tiles. - **gridSizeByZoom** (Array., optional) - Array of values, where each value corresponds to the size of a tile(or segment) on the globe. Each value must be power of two. - **heightFactor** (number, optional) - Elevation height multiplier. Default: 1. - **gridSizeByZoom** (Array., optional) - Array of segment triangulation grid sizes. - **heightFactor** (number, optional) - Elevation height multiplier. ### Request Example ```json { "name": "srtm", "options": { "minZoom": 5, "maxZoom": 16, "url": "//example.com/terrain/{z}/{y}/{x}.ddm" } } ``` ### Response #### Success Response (200) N/A (Constructor does not return a value) #### Response Example N/A ``` -------------------------------- ### Path Setting Methods Source: https://openglobus.github.io/docs/Polyline Methods for setting the polyline's path using different coordinate systems. ```APIDOC ## Path Setting Methods ### _setEqualPath3v(path3v) Sets the polyline path with cartesian coordinates. #### Parameters * **path3v** (Array.) - Cartesian coordinates for the path. ### _setEqualPathLonLat(pathLonLat) Sets the polyline path with geodetic coordinates. #### Parameters * **pathLonLat** (Array.) - Geodetic coordinates for the path. ``` -------------------------------- ### BaseBillboard Methods Source: https://openglobus.github.io/docs/BaseBillboard Provides documentation for various methods available on the BaseBillboard class for managing billboard properties. ```APIDOC ## BaseBillboard Methods ### getAlignedAxis() ### Description Returns the billboard's aligned vector. ### Method GET ### Endpoint N/A (Instance Method) ### Parameters None ### Request Example N/A ### Response #### Success Response (200) - **alignedAxis** (Vec3) - The billboard's aligned vector. #### Response Example ```json { "alignedAxis": [1, 0, 0] } ``` --- ### getColor() ### Description Returns the billboard's RGBA color. ### Method GET ### Endpoint N/A (Instance Method) ### Parameters None ### Request Example N/A ### Response #### Success Response (200) - **color** (Vec4) - The billboard's RGBA color. #### Response Example ```json { "color": [1, 0, 0, 1] } ``` --- ### getOffset() ### Description Returns the billboard's screen space offset size. ### Method GET ### Endpoint N/A (Instance Method) ### Parameters None ### Request Example N/A ### Response #### Success Response (200) - **offset** (Vec3) - The billboard's screen space offset. #### Response Example ```json { "offset": [0, 0, 0] } ``` --- ### getPosition() ### Description Returns the billboard's position. ### Method GET ### Endpoint N/A (Instance Method) ### Parameters None ### Request Example N/A ### Response #### Success Response (200) - **position** (Vec3) - The billboard's position. #### Response Example ```json { "position": [10, 20, 30] } ``` --- ### getRotation() ### Description Gets the billboard's screen space rotation. ### Method GET ### Endpoint N/A (Instance Method) ### Parameters None ### Request Example N/A ### Response #### Success Response (200) - **rotation** (number) - The billboard's screen space rotation in radians. #### Response Example ```json { "rotation": 0.5 } ``` --- ### getVisibility() ### Description Returns the billboard's visibility status. ### Method GET ### Endpoint N/A (Instance Method) ### Parameters None ### Request Example N/A ### Response #### Success Response (200) - **visibility** (boolean) - The billboard's visibility status. #### Response Example ```json { "visibility": true } ``` --- ### remove() ### Description Removes the billboard from its handler. ### Method DELETE ### Endpoint N/A (Instance Method) ### Parameters None ### Request Example N/A ### Response #### Success Response (200) N/A (This method typically performs an action and does not return data) #### Response Example N/A --- ### setAlignedAxis(x, y, z) ### Description Sets the billboard's cartesian aligned vector. ### Method POST ### Endpoint N/A (Instance Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **x** (number) - Required - Aligned vector X coordinate. - **y** (number) - Required - Aligned vector Y coordinate. - **z** (number) - Required - Aligned vector Z coordinate. ### Request Example ```json { "x": 1, "y": 0, "z": 0 } ``` ### Response #### Success Response (200) N/A (This method typically performs an action and does not return data) #### Response Example N/A --- ### setAlignedAxis3v(alignedAxis) ### Description Sets the billboard's aligned vector. ### Method POST ### Endpoint N/A (Instance Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **alignedAxis** (Vec3) - Required - The direction vector for alignment. ### Request Example ```json { "alignedAxis": [1, 0, 0] } ``` ### Response #### Success Response (200) N/A (This method typically performs an action and does not return data) #### Response Example N/A --- ### setColor(r, g, b, a) ### Description Sets the billboard's RGBA color. Each channel should be between 0.0 and 1.0. ### Method POST ### Endpoint N/A (Instance Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **r** (number) - Required - Red channel (0.0 to 1.0). - **g** (number) - Required - Green channel (0.0 to 1.0). - **b** (number) - Required - Blue channel (0.0 to 1.0). - **a** (number) - Required - Alpha channel (0.0 to 1.0). ### Request Example ```json { "r": 1, "g": 0.5, "b": 0, "a": 1 } ``` ### Response #### Success Response (200) N/A (This method typically performs an action and does not return data) #### Response Example N/A --- ### setColor4v(color) ### Description Sets the billboard's RGBA color using a Vec4. Each channel should be between 0.0 and 1.0. ### Method POST ### Endpoint N/A (Instance Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **color** (Vec4) - Required - The RGBA color vector. ### Request Example ```json { "color": [1, 0.5, 0, 1] } ``` ### Response #### Success Response (200) N/A (This method typically performs an action and does not return data) #### Response Example N/A --- ### setColorHTML(color) ### Description Sets the billboard's color using an HTML-style color string. ### Method POST ### Endpoint N/A (Instance Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **color** (string) - Required - HTML style color (e.g., "#FF0000", "red"). ### Request Example ```json { "color": "#FF0000" } ``` ### Response #### Success Response (200) N/A (This method typically performs an action and does not return data) #### Response Example N/A --- ### setOffset(x, y, zopt) ### Description Sets the billboard's screen space offset. ### Method POST ### Endpoint N/A (Instance Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **x** (number) - Required - X offset. - **y** (number) - Required - Y offset. - **z** (number) - Optional - Z offset. ### Request Example ```json { "x": 5, "y": 10, "z": 0 } ``` ### Response #### Success Response (200) N/A (This method typically performs an action and does not return data) #### Response Example N/A --- ### setOffset3v(offset) ### Description Sets the billboard's screen space offset using a Vec2. ### Method POST ### Endpoint N/A (Instance Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **offset** (Vec2) - Required - The offset size vector. ### Request Example ```json { "offset": [5, 10] } ``` ### Response #### Success Response (200) N/A (This method typically performs an action and does not return data) #### Response Example N/A --- ### setOpacity(a) ### Description Sets the billboard's opacity. ### Method POST ### Endpoint N/A (Instance Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **a** (number) - Required - Billboard opacity (typically 0.0 to 1.0). ### Request Example ```json { "a": 0.8 } ``` ### Response #### Success Response (200) N/A (This method typically performs an action and does not return data) #### Response Example N/A --- ### setPickingColor3v(color) ### Description Sets the billboard's picking color. ### Method POST ### Endpoint N/A (Instance Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **color** (Vec3) - Required - The picking color vector. ### Request Example ```json { "color": [0.1, 0.2, 0.3] } ``` ### Response #### Success Response (200) N/A (This method typically performs an action and does not return data) #### Response Example N/A --- ### setPosition(x, y, z) ### Description Sets the billboard's position. ### Method POST ### Endpoint N/A (Instance Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **x** (number) - Required - X coordinate. - **y** (number) - Required - Y coordinate. - **z** (number) - Required - Z coordinate. ### Request Example ```json { "x": 10, "y": 20, "z": 30 } ``` ### Response #### Success Response (200) N/A (This method typically performs an action and does not return data) #### Response Example N/A --- ### setPosition3v(position) ### Description Sets the billboard's position using a Vec3. ### Method POST ### Endpoint N/A (Instance Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **position** (Vec3) - Required - The cartesian coordinates vector. ### Request Example ```json { "position": [10, 20, 30] } ``` ### Response #### Success Response (200) N/A (This method typically performs an action and does not return data) #### Response Example N/A --- ### setRotation(rotation) ### Description Sets the billboard's screen space rotation in radians. ### Method POST ### Endpoint N/A (Instance Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **rotation** (number) - Required - Screen space rotation in radians. ### Request Example ```json { "rotation": 0.785 } ``` ### Response #### Success Response (200) N/A (This method typically performs an action and does not return data) #### Response Example N/A ``` -------------------------------- ### Entity Methods Source: https://openglobus.github.io/docs/Entity Documentation for various methods available on Entity objects, including adding to collections, manipulating positions, and retrieving properties. ```APIDOC ## addTo(collection) ### Description Adds the current entity to the specified entity collection or vector layer. ### Method POST ### Endpoint /entity ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **collection** (EntityCollection | Vector) - Required - The entity collection or vector layer to add the entity to. ### Request Example ```json { "collection": "myEntityCollection" } ``` ### Response #### Success Response (200) - **Entity** (Entity) - Returns the entity object itself after adding it to the collection. #### Response Example ```json { "id": "entity-id-123", "name": "Added Entity" } ``` ## appendChild(entity) ### Description Appends a child entity to the current entity. ### Method POST ### Endpoint /entity/{entityId}/children ### Parameters #### Path Parameters - **entityId** (string) - Required - The ID of the parent entity. #### Query Parameters None #### Request Body - **entity** (Entity) - Required - The child entity to append. ### Request Example ```json { "entity": { "name": "Child Entity" } } ``` ### Response #### Success Response (200) - **Entity** (Entity) - The parent entity with the appended child. #### Response Example ```json { "id": "parent-entity-id", "name": "Parent Entity", "children": [ { "id": "child-entity-id", "name": "Child Entity" } ] } ``` ## getAbsoluteCartesian() ### Description Retrieves the absolute cartesian position of the entity in 3D space. ### Method GET ### Endpoint /entity/{entityId}/absolute-cartesian ### Parameters #### Path Parameters - **entityId** (string) - Required - The ID of the entity. ### Response #### Success Response (200) - **Vec3** (Vec3) - The absolute cartesian position as a Vec3 object. #### Response Example ```json { "x": 100000.0, "y": 200000.0, "z": 300000.0 } ``` ## getAbsolutePitch() ### Description Gets the absolute pitch angle of the entity in radians. ### Method GET ### Endpoint /entity/{entityId}/absolute-pitch ### Parameters #### Path Parameters - **entityId** (string) - Required - The ID of the entity. ### Response #### Success Response (200) - **number** (number) - The absolute pitch angle in radians. #### Response Example ```json 1.57 ``` ## getAbsoluteRoll() ### Description Gets the absolute roll angle of the entity in radians. ### Method GET ### Endpoint /entity/{entityId}/absolute-roll ### Parameters #### Path Parameters - **entityId** (string) - Required - The ID of the entity. ### Response #### Success Response (200) - **number** (number) - The absolute roll angle in radians. #### Response Example ```json 0.785 ``` ``` -------------------------------- ### Polyline Information Methods Source: https://openglobus.github.io/docs/Polyline Methods for retrieving information about the polyline. ```APIDOC ## Polyline Information Methods ### clear() Clears all data from the polyline. ### getExtent() -> Extent Returns the geodetic extent of the polyline. ### getOpacity(opacity) -> number Gets the polyline's opacity. #### Parameters * **opacity** (number) - The opacity value to get. ### getPath3v() -> Array. Returns the polyline's path in cartesian coordinates. ### getPathLonLat() -> Array. Returns the polyline's path in geodetic coordinates. ### getThickness() -> number Returns the polyline's thickness. ### getVisibility() -> boolean Gets the polyline's visibility status. ``` -------------------------------- ### Image Loading API Source: https://openglobus.github.io/docs/TextureAtlas Details on the asynchronous function for loading images into the image cache and handling completion callbacks. ```APIDOC ## loadImage /websites/openglobus_github_io ### Description Asynchronous function that loads and creates an image to the image cache, and calls a success callback when it's done. ### Method Asynchronous function call ### Endpoint N/A (Client-side JavaScript function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```javascript loadImage('path/to/image.jpg', function(image) { console.log('Image loaded successfully'); }); ``` ### Response #### Success Response N/A (callback is invoked) #### Response Example N/A ``` -------------------------------- ### Vector Layer Constructor Source: https://openglobus.github.io/docs/Vector Initializes a new Vector layer. This layer is used for rendering geospatial data such as points, lines, and polygons. ```APIDOC ## new Vector(nameOpt, optionsOpt) ### Description Initializes a new Vector layer. This layer is used for rendering geospatial data such as points, lines, and polygons. ### Method Constructor ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters (Constructor Arguments) - **name** (string, optional) - The name of the layer. Defaults to "noname". - **options** (IVectorParams, optional) - Layer options: - **minZoom** (number, optional) - Minimum visible zoom level. Defaults to 0. - **maxZoom** (number, optional) - Maximum visible zoom level. Defaults to 50. - **attribution** (string, optional) - Layer attribution text. - **zIndex** (string, optional) - Layer Z-order index. Defaults to 0. - **visibility** (boolean, optional) - Layer visibility. Defaults to true. - **isBaseLayer** (boolean, optional) - Whether the layer is a base layer. Defaults to false. - **entities** (Array, optional) - An array of entities to add to the layer. - **scaleByDistance** (Array, optional) - Scale by distance parameters (exactly 3 entries). - **nodeCapacity** (number, optional) - Maximum entities quantity in a tree node for rendering optimization. Defaults to 30. - **async** (boolean, optional) - Enable asynchronous vector data handling for optimization. Defaults to true. - **clampToGround** (boolean, optional) - Whether to clamp vector data to the ground. Defaults to false. - **relativeToGround** (boolean, optional) - Whether to place vector data relative to the ground relief. Defaults to false. - **polygonOffsetUnits** (Number, optional) - Multiplier for depth offset for polygons. Defaults to 0.0. ### Request Example ```json { "name": "MyVectorLayer", "options": { "minZoom": 1, "maxZoom": 20, "entities": [], "scaleByDistance": [1000000, 500000, 100000], "async": false } } ``` ### Response #### Success Response (200) Returns the newly created Vector layer instance. #### Response Example ```json { "layerId": "vectorLayer123", "name": "MyVectorLayer" } ``` ### Fires - `EventsHandler#event:draw` - `EventsHandler#event:add` - `EventsHandler#event:remove` - `EventsHandler#event:entityadd` - `EventsHandler#event:entityremove` - `EventsHandler#event:visibilitychange` ``` -------------------------------- ### UI Component Initialization (TypeScript) Source: https://openglobus.github.io/docs/control_atmosphere_AtmosphereConfig Initializes and configures UI components for managing atmosphere parameters. This includes a toggle button to show/hide the parameter dialog and the dialog itself, which contains various sliders for adjustment. An event listener is set up to synchronize the toggle button's active state with the dialog's visibility. ```typescript this._toggleBtn = new ToggleButton({ classList: ["og-map-button", "og-atmosphere_button"], icon: ICON_BUTTON_SVG }); this._dialog = new Dialog({ title: "Atmosphere Parameters", visible: false, useHide: true, top: 60, left: 60, width: 720 }); this._dialog.events.on("visibility", (v: boolean) => { this._toggleBtn.setActive(v); }); this._panel = new View({ template: TEMPLATE }); ``` -------------------------------- ### TextureAtlas Constructor Source: https://openglobus.github.io/docs/TextureAtlas Initializes a new TextureAtlas. You can optionally specify the width and height of the atlas texture. ```APIDOC ## new TextureAtlas(width, height) ### Description Initializes a new TextureAtlas with optional width and height parameters. ### Method Constructor ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body * **width** (number) - Optional - Texture atlas width. Defaults to 1024. * **height** (number) - Optional - Texture atlas height. Defaults to 1024. ### Request Example ```json { "width": 512, "height": 512 } ``` ### Response #### Success Response (200) * **TextureAtlas** (object) - An instance of the TextureAtlas. #### Response Example ```json { "message": "TextureAtlas initialized successfully" } ``` ``` -------------------------------- ### Buffer Management Methods Source: https://openglobus.github.io/docs/Polyline Methods related to managing WebGL buffers for rendering. ```APIDOC ## Buffer Management Methods ### _createIndexBuffer() Creates the WebGL index and order buffer. ### _createVerticesBuffer() Creates the WebGL vertices buffers. ### _deleteBuffers() Clears the WebGL buffers. ### _refresh() Refreshes the render buffers. ### _update() Updates the render buffers. ``` -------------------------------- ### Point Addition Methods Source: https://openglobus.github.io/docs/Polyline Methods for adding points to the polyline path. ```APIDOC ## Point Addition Methods ### addPoint3v(point3v, multiLineIndex) Appends a new point to the end of the path in the specified segment. #### Parameters * **point3v** (Vec3) - The new point's coordinates. * **multiLineIndex** (number, optional) - The path segment index. Defaults to 0. ### addPointLonLat(lonLat, multiLineIndex) Appends a new geodetic point to the end of the path in the specified segment. #### Parameters * **lonLat** (LonLat) - The new point's geodetic coordinates. * **multiLineIndex** (number, optional) - The path segment index. Defaults to 0. ### appendPoint3v(point3v, color, skipEllipsoid) Adds a new cartesian point to the end of the path in the last line segment. #### Parameters * **point3v** (Vec3) - The new point's coordinates. * **color** (NumberArray4, optional) - The color for the new point. * **skipEllipsoid** (boolean, optional) - Whether to skip ellipsoid calculations. ``` -------------------------------- ### Planet Events Source: https://openglobus.github.io/docs/Planet The Planet class fires several events that can be subscribed to for handling different occurrences within the planet's lifecycle. ```APIDOC ## Planet Events ### Description Events fired by the Planet class. ### Fires - `EventsHandler#event:draw` - `EventsHandler#event:layeradd` - `EventsHandler#event:baselayerchange` - `EventsHandler#event:layerremove` - `EventsHandler#event:layervisibilitychange` - `EventsHandler#event:geoimageadd` ``` -------------------------------- ### Frame Rendering Source: https://openglobus.github.io/docs/Planet The `frame` function is a callback used for rendering each active camera frustum. ```APIDOC ## frame() ### Description This is a render node callback. The `frame` function is executed for each active camera frustum during rendering. ### Method N/A ### Endpoint N/A ### Parameters None ### Request Example None ### Response #### Success Response (200) None (This is a rendering callback) #### Response Example None ``` -------------------------------- ### Initialize UI Elements and Bind Sliders Source: https://openglobus.github.io/docs/control_atmosphere_AtmosphereConfig Initializes the UI elements for the atmosphere configuration panel, including appending buttons and dialogs. It then queries for specific HTML elements within the panel and appends the corresponding slider controls to them. ```typescript this._toggleBtn.appendTo(this.renderer!.div!); this._dialog.appendTo(this.renderer!.div!); this._panel.appendTo(this._dialog.container!); if (this._panel.el) { this.$height = this._panel.el.querySelector(".og-option.og-atmosphere-height"); this.$maxOpacity = this._panel.el.querySelector(".og-option.og-atmosphere-maxOpacity"); this.$minOpacity = this._panel.el.querySelector(".og-option.og-atmosphere-minOpacity"); this.$rayleight = this._panel.el.querySelector(".og-option.og-atmosphere-rayleight"); this.$mie = this._panel.el.querySelector(".og-option.og-atmosphere-mie"); this.$bottomRadius = this._panel.el.querySelector(".og-option.og-atmosphere-bottomRadius"); this.$mieScatteringCoefficient = this._panel.el.querySelector(".og-option.og-atmosphere-mieScatteringCoefficient"); this.$mieExtinctionCoefficient = this._panel.el.querySelector(".og-option.og-atmosphere-mieExtinctionCoefficient"); this.$rayleighScatteringCoefficientA = this._panel.el.querySelector(".og-option.og-atmosphere-rayleighScatteringCoefficientA"); this.$rayleighScatteringCoefficientB = this._panel.el.querySelector(".og-option.og-atmosphere-rayleighScatteringCoefficientB"); this.$rayleighScatteringCoefficientC = this._panel.el.querySelector(".og-option.og-atmosphere-rayleighScatteringCoefficientC"); this.$ozoneAbsorptionCoefficientA = this._panel.el.querySelector(".og-option.og-atmosphere-ozoneAbsorptionCoefficientA"); this.$ozoneAbsorptionCoefficientB = this._panel.el.querySelector(".og-option.og-atmosphere-ozoneAbsorptionCoefficientB"); this.$ozoneAbsorptionCoefficientC = this._panel.el.querySelector(".og-option.og-atmosphere-ozoneAbsorptionCoefficientC"); this.$sunAngularRadius = this._panel.el.querySelector(".og-option.og-atmosphere-sunAngularRadius"); this.$sunIntensity = this._panel.el.querySelector(".og-option.og-atmosphere-sunIntensity"); this.$groundAlbedo = this._panel.el.querySelector(".og-option.og-atmosphere-earthAlbedo"); this.$ozoneDensityHeight = this._panel.el.querySelector(".og-option.og-atmosphere-ozoneDensityHeight"); this.$ozoneDensityWide = this._panel.el.querySelector(".og-option.og-atmosphere-ozoneDensityWide"); } this._maxOpacity.appendTo(this.$maxOpacity!); this._minOpacity.appendTo(this.$minOpacity!); this._height.appendTo(this.$height!); this._rayleight.appendTo(this.$rayleight!); this._mie.appendTo(this.$mie!); this._bottomRadius.appendTo(this.$bottomRadius!); this._mieScatteringCoefficient.appendTo(this.$mieScatteringCoefficient!); this._mieExtinctionCoefficient.appendTo(this.$mieExtinctionCoefficient!); this._rayleighScatteringCoefficientA.appendTo(this.$rayleighScatteringCoefficientA!); this._rayleighScatteringCoefficientB.appendTo(this.$rayleighScatteringCoefficientB!); ```