Class: Globe

og/Globe~Globe

Creates a WebGL context with globe.

new Globe(options)

Name Type Description
options object Options:
Name Type Default Description
target string HTML element id where planet canvas have to be created.
skybox RenderNode optional Render skybox. null - default.
name string optional Planet name. Default is unic identifier.
terrain Terrain optional Terrain provider. Default no terrain - og.terrain.EmptyTerrain.
controls Array.<control.Control> optional Renderer controls array.
layers Array.<Layer> optional Planet layers.
viewExtent Extent optional Viewable starting extent.
autoActivate boolean optional Globe rendering auto activation flag. True is default.
attributionContainer DOMElement optional Container for attribution list.
maxGridSize Number optional = Maximal segment grid size. 128 is default
useSpecularTexture boolean optional use specular water mask
useNightTexture boolean optional show night cities
maxAltitude Number 15000000.0 optional Maximal camera altitude above terrain
minAltitude Number 1.0 optional Minimal camera altitude above terrain
maxEqualZoomAltitude Number 15000000.0 optional Maximal altitude since segments on the screen bacame the same zoom level
minEqualZoomAltitude Number 10000.0 optional Minimal altitude since segments on the screen bacame the same zoom level
minEqualZoomCameraSlope Number 0.8 optional Minimal camera slope above te globe where segments on the screen bacame the same zoom level
loadingBatchSize Number 12 optional -
Example

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: "http://b.tile.openstreetmap.org/{z}/{x}/{y}.png", visibility: true, attribution: 'Data @ OpenStreetMap contributors, ODbL' })
     ],
    'autoActivate': true
});

Members

rendererRenderer

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

Methods

fadeIn()

Starts screen brightness fading in effect by the duration time.

fadeOut(duration)

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