Class: Globus


new og.Globus(options)

Creates a WebGL context with globe.
Name Type Description
options object Options:
Name Type Description
target string HTML element id where planet canvas have to be created.
skybox boolean optional Render skybox. null - default.
atmosphere boolean optional Render planet with atmosphere. False - default.
name string optional Planet name. Default is unic identifier.
terrain og.terrainProvider.TerrainProvider optional Terrain provider. Default no terrain - og.terrainProvider.EmptyTerrainProvider.
controls Array.<og.control.BaseControl> optional Renderer controls array.
layers Array.<og.layer.Layer> optional Planet layers.
viewExtent og.Extent optional Viewable starting extent.
autoActivate boolean optional Globus rendering auto activation flag. True is default.

Basic initialization

globus = new og.Globus({
    'atmosphere': false,
    'target': 'globus',
    'name': 'Earth',
    'controls': [
         new og.control.MouseNavigation({ autoActivate: true }),
         new og.control.KeyboardNavigation({ autoActivate: true }),
         new og.control.EarthCoordinates({ autoActivate: true, center: false }),
         new og.control.LayerSwitcher({ autoActivate: true }),
         new og.control.ZoomControl({ autoActivate: true }),
         new og.control.TouchNavigation({ autoActivate: true }),
         new og.control.Sun({ autoActivate: true })
    'skybox': skybox,
    'terrain': terrain,
    'layers': [
         new og.layer.XYZ("OpenStreetMap", { isBaseLayer: true, url: "{z}/{x}/{y}.png", visibility: true, attribution: 'Data @ OpenStreetMap contributors, ODbL' })
    'autoActivated': true





Dom element where WebGL canvas creates
Render node renders a planet.


Interface for the renderer context(events, input states, renderer nodes etc.)



Starts screen brightness fading in effect by the duration time.
Name Type Description
duration number fadein duration time.


Starts screen brightness fading out effect by the duration time.
Name Type Description
duration number Fadeout duration time.