Class: Globe


Creates a WebGL context with globe.

new Globe(options)

Name Type Description
options object Options:
Name Type Description
target string HTML element id where planet canvas have to be created.
skybox og.scene.RenderNode optional Render skybox. null - default.
name string optional Planet name. Default is unic identifier.
terrain og.terrain.Terrain optional Terrain provider. Default no terrain - og.terrain.EmptyTerrain.
controls Array.<og.control.Control> optional Renderer controls array.
layers Array.<og.Layer> optional Planet layers.
viewExtent og.Extent optional Viewable starting extent.
autoActivate boolean optional Globe rendering auto activation flag. True is default.

Basic initialization

globus = new og.Globe({
    '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 })
    'terrain': new og.terrain.GlobusTerrain(),
    'layers': [
         new og.layer.XYZ("OpenStreetMap", { isBaseLayer: true, url: "{z}/{x}/{y}.png", visibility: true, attribution: 'Data @ OpenStreetMap contributors, ODbL' })
    'autoActivate': true



Dom element where WebGL canvas creates


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



Returns true if the object pointer is undefined.
Name Type Description
obj Object Object pointer.
Type Description
boolean Returns true if object is undefined.


Starts screen brightness fading in effect by the duration time.


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