Globe

Creates a WebGL context with globe.

Constructor

new Globe(options)

Parameters:
NameTypeAttributesDefaultDescription
optionsIGlobeParams

Options:

Properties
NameTypeAttributesDescription
targetstring | HTMLElement

HTML element id where planet canvas have to be created.

namestring<optional>

Planet name. Default is uniq identifier.

terrainEmptyTerrain<optional>

Terrain provider. Default no terrain - og.terrain.EmptyTerrain.

controlsArray.<Control><optional>

Renderer controls array.

layersArray.<Layer><optional>

Planet layers.

options.autoActivateboolean<optional>
true

Globe rendering auto activation flag. True is default.

options.attributionContainerHTMLElement<optional>

Container for attribution list.

options.maxGridSizenumber<optional>
128

= Maximal segment grid size. 128 is default

options.fontsSrcstring<optional>

Fonts collection url.

options.resourcesSrcstring<optional>

Resources root src.

options.nightTextureSrcstring<optional>

Night glowing image sources

options.specularTextureSrcstring<optional>

Specular water mask image sourcr

options.maxAltitudenumber<optional>
15000000.0

Maximal camera altitude above terrain

options.minAltitudenumber<optional>
1.0

Minimal camera altitude above terrain

options.maxEqualZoomAltitudenumber<optional>
15000000.0

Maximal altitude since segments on the screen became the same zoom level

options.minEqualZoomAltitudenumber<optional>
10000.0

Minimal altitude since segments on the screen became the same zoom level

options.minEqualZoomCameraSlopenumber<optional>
0.8

Minimal camera slope above te globe where segments on the screen became the same zoom level

options.loadingBatchSizenumber<optional>
12
options.quadTreeStrategyPrototypenumber<optional>

Prototype of quadTree. QuadTreeStrategy for Earth is default.

options.msaanumber<optional>
0

MSAA antialiasing parameter: 2,4,8,16. Default is 0.

options.dpinumber<optional>

Device pixel ratio. Default is current screen DPI.

options.atmosphereEnabledboolean<optional>

Enables atmosphere effect.

options.transtitionOpacityEnabledboolean<optional>

Enables terrain smooth opacity transition effect.

options.atmosphereParametersIAtmosphereParams<optional>

Atmosphere model parameters.

Example

Basic initialization

globus = new Globe({
    'atmosphere': false,
    'target': 'globus',
    'name': 'Earth',
    'controls': [
         new control.MouseNavigation({ autoActivate: true }),
         new control.KeyboardNavigation({ autoActivate: true }),
         new control.EarthCoordinates({ autoActivate: true, center: false }),
         new control.LayerSwitcher({ autoActivate: true }),
         new control.ZoomControl({ autoActivate: true }),
         new control.TouchNavigation({ autoActivate: true }),
         new control.Sun({ autoActivate: true })
     ],
    'terrain': new GlobusTerrain(),
    'layers': [
         new XYZ("OpenStreetMap", { isBaseLayer: true, url: "http://b.tile.openstreetmap.org/{z}/{x}/{y}.png", visibility: true, attribution: 'Data @ <a href="http://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="http://www.openstreetmap.org/copyright">ODbL</a>' })
     ],
    'autoActivate': true
});

Members

$inner :Element

Dom element where WebGL canvas creates

Type:
  • Element

Methods

fadeIn()

Starts screen brightness fading in effect by the duration time.

fadeOut()

Starts screen brightness fading out effect by the duration time.