Globe

Creates a WebGL context with globe.

Constructor

new Globe(options)

Parameters:
NameTypeDescription
optionsIGlobeParams

Options:

Properties
NameTypeAttributesDefaultDescription
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>

Controls.

layersArray.<Layer><optional>

Planet layers.

viewExtentExtent | ExtentBoundingBox<optional>

[options.viewExtent] - Viewable starting extent.

autoActivateboolean<optional>
true

Globe rendering auto activation flag. True is default.

attributionContainerHTMLElement<optional>

Container for attribution list.

maxGridSizenumber<optional>
128

= Maximal segment grid size. 128 is default

fontsSrcstring<optional>

Fonts collection url.

resourcesSrcstring<optional>

Resources root src.

nightTextureSrcstring<optional>

Night glowing image sources

specularTextureSrcstring<optional>

Specular water mask image sourcr

maxAltitudenumber<optional>
15000000.0

Maximal camera altitude above terrain

minAltitudenumber<optional>
1.0

Minimal camera altitude above terrain

maxEqualZoomAltitudenumber<optional>
15000000.0

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

minEqualZoomAltitudenumber<optional>
10000.0

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

minEqualZoomCameraSlopenumber<optional>
0.8

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

loadingBatchSizenumber<optional>
12
quadTreeStrategyPrototypenumber<optional>

Prototype of quadTree. QuadTreeStrategy for Earth is default.

msaanumber<optional>
0

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

dpinumber<optional>

Device pixel ratio. Default is current screen DPI.

atmosphereEnabledboolean<optional>

Enables atmosphere effect.

transtitionOpacityEnabledboolean<optional>

Enables terrain smooth opacity transition effect.

atmosphereParametersIAtmosphereParams<optional>

Atmosphere model parameters.

gammanumber<optional>

Gamma

exposurenumber<optional>

Exposure

Example

Basic initialization

globus = new Globe({
    atmosphere: false,
    target: 'globus',
    name: 'Earth',
    controls: [
         new control.MouseNavigation(),
         new control.KeyboardNavigation(),
         new control.EarthCoordinates(),
         new control.LayerSwitcher({),
         new control.ZoomControl(),
         new control.TouchNavigation(),
         new control.Sun()
     ],
    terrain: new GlobusRGBTerrain(),
    layers: [new OpenStreetMap(), new Bing()],
    atmosphereEnabled: 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.