# Globe

#### new Cesium.Globe(ellipsoid)
Scene/Globe.js 75

The globe rendered in the scene, including its terrain (`Globe#terrainProvider`) and imagery layers (`Globe#imageryLayers`). Access the globe using `Scene#globe`.

Name | Type | Default | Description
--- | --- | --- | ---
`ellipsoid` | Ellipsoid | `Ellipsoid.WGS84` | optional Determines the size and shape of the globe.

### Members

#### atmosphereBrightnessShift : Number
Scene/Globe.js 286

The brightness shift to apply to the atmosphere. Defaults to 0.0 (no shift). A brightness shift of -1.0 is complete darkness, which will let space show through.

Default Value: `0.0`

#### atmosphereHueShift : Number
Scene/Globe.js 270

The hue shift to apply to the atmosphere. Defaults to 0.0 (no shift). A hue shift of 1.0 indicates a complete rotation of the hues available.

Default Value: `0.0`

#### atmosphereSaturationShift : Number
Scene/Globe.js 278

The saturation shift to apply to the atmosphere. Defaults to 0.0 (no shift). A saturation shift of -1.0 is monochrome.

Default Value: `0.0`

#### baseColor : Color
Scene/Globe.js 349

Gets or sets the color of the globe when no imagery is available.

#### clippingPlanes : ClippingPlaneCollection
Scene/Globe.js 403

A property specifying a `ClippingPlaneCollection` used to selectively disable rendering on the outside of each plane.

#### depthTestAgainstTerrain : Boolean
Scene/Globe.js 252

True if primitives such as billboards, polylines, labels, etc. should be depth-tested against the terrain surface, or false if such primitives should always be drawn on top of terrain unless they're on the opposite side of the globe. The disadvantage of depth testing primitives against terrain is that slight numerical noise or terrain level-of-detail switched can sometimes make a primitive that should be on the surface disappear underneath it.

Default Value: `false`

#### ellipsoid : Ellipsoid
Scene/Globe.js 302

Gets an ellipsoid describing the shape of this globe.

#### enableLighting : Boolean
Scene/Globe.js 183

Enable lighting the globe with the sun as a light source.

Default Value: `false`

#### fillHighlightColor : Color
Scene/Globe.js 175

The color to use to highlight terrain fill tiles. If undefined, fill tiles are not highlighted at all. The alpha value is used to alpha blend with the tile's actual color. Because terrain fill tiles do not represent the actual terrain surface, it may be useful in some applications to indicate visually that they are not to be trusted.

Default Value: `undefined`

#### imageryLayers : ImageryLayerCollection
Scene/Globe.js 312

Gets the collection of image layers that will be rendered on this globe.

#### readonlyimageryLayersUpdatedEvent : Event
Scene/Globe.js 324

Gets an event that's raised when an imagery layer is added, shown, hidden, moved, or removed.

#### lightingFadeInDistance : Number
Scene/Globe.js 211

The distance where lighting resumes. This only takes effect when `enableLighting` or `showGroundAtmosphere` is `true`.

Default Value: `20000000.0`

#### lightingFadeOutDistance : Number
Scene/Globe.js 202

The distance where everything becomes lit. This only takes effect when `enableLighting` or `showGroundAtmosphere` is `true`.

Default Value: `10000000.0`

#### loadingDescendantLimit : Number
Scene/Globe.js 146

Gets or sets the number of loading descendant tiles that is considered "too many". If a tile has too many loading descendants, that tile will be loaded and rendered before any of its descendants are loaded and rendered. This means more feedback for the user that something is happening at the cost of a longer overall load time. Setting this to 0 will cause each tile level to be loaded successively, significantly increasing load time. Setting it to a large number (e.g. 1000) will minimize the number of tiles that are loaded but tend to make detail appear all at once after a long wait.

Default Value: `20`

#### material : Material
Scene/Globe.js 499

Gets or sets the material appearance of the Globe. This can be one of several built-in `Material` objects or a custom material, scripted with Fabric.

#### maximumScreenSpaceError : Number
Scene/Globe.js 122

The maximum screen-space error used to drive level-of-detail refinement. Higher values will provide better performance but lower visual quality.

Default Value: `2`

#### nightFadeInDistance : Number
Scene/Globe.js 229

The distance where the darkness of night from the ground atmosphere fades in to an unlit ground atmosphere. This only takes effect when `showGroundAtmosphere` and `enableLighting` are `true`.

Default Value: `50000000.0`

#### nightFadeOutDistance : Number
Scene/Globe.js 220

The distance where the darkness of night from the ground atmosphere fades out to a lit ground atmosphere. This only takes effect when `showGroundAtmosphere` and `enableLighting` are `true`.

Default Value: `10000000.0`

#### oceanNormalMapUrl : String
Scene/Globe.js 437

The normal map to use for rendering waves in the ocean. Setting this property will only have an effect if the configured terrain provider includes a water mask.

Default Value: `buildModuleUrl('Assets/Textures/waterNormalsSmall.jpg')`

#### parentScene
Scene/Globe.js 514

父场景

#### preloadAncestors : Boolean
Scene/Globe.js 155

Gets or sets a value indicating whether the ancestors of rendered tiles should be preloaded. Setting this to true optimizes the zoom-out experience and provides more detail in newly-exposed areas when panning. The down side is that it requires loading more tiles.

Default Value: `true`

#### preloadSiblings : Boolean
Scene/Globe.js 165

Gets or sets a value indicating whether the siblings of rendered tiles should be preloaded. Setting this to true causes tiles with the same parent as a rendered tile to be loaded, even if they are culled. Setting this to true may provide a better panning experience at the cost of loading more tiles.

Default Value: `false`

#### shadows : ShadowMode
Scene/Globe.js 262

Determines whether the globe casts or receives shadows from each light source. Setting the globe to cast shadows may impact performance since the terrain is rendered again from the light's perspective. Currently only terrain that is in view casts shadows. By default the globe does not cast shadows.

Default Value: `ShadowMode.RECEIVE_ONLY`

#### show : Boolean
Scene/Globe.js 108

Determines if the globe will be shown.

Default Value: `true`

#### showGroundAtmosphere : Boolean
Scene/Globe.js 193

Enable the ground atmosphere, which is drawn over the globe when viewed from a distance between `lightingFadeInDistance` and `lightingFadeOutDistance`.

Default Value: `true`

##### Demo:

- Ground atmosphere demo in Sandcastle

#### showWaterEffect : Boolean
Scene/Globe.js 239

True if an animated wave effect should be shown in areas of the globe covered by water; otherwise, false. This property is ignored if the `terrainProvider` does not provide a water mask.

Default Value: `true`

#### terrainProvider : TerrainProvider
Scene/Globe.js 454

The terrain provider providing surface geometry for this globe.

#### readonlyterrainProviderChanged : Event
Scene/Globe.js 475

Gets an event that's raised when the terrain provider is changed

#### tileCacheSize : Number
Scene/Globe.js 133

The size of the terrain tile cache, expressed as a number of tiles. Any additional tiles beyond this number will be freed, as long as they aren't needed for rendering this frame. A larger number will consume more memory but will show detail faster when, for example, zooming out and then back in.

Default Value: `100`

#### tileLoadProgressEvent : Event
Scene/Globe.js 487

Gets an event that's raised when the length of the tile load queue has changed since the last render frame. When the load queue is empty, all terrain and imagery for the current view have been loaded. The event passes the new length of the tile load queue.

#### readonlytilesLoaded : Boolean
Scene/Globe.js 336

Returns `true` when the tile load queue is empty, `false` otherwise. When the load queue is empty, all terrain and imagery for the current view have been loaded.

### Methods

#### destroy()
Scene/Globe.js 978

Destroys the WebGL resources held by this object. Destroying an object allows for deterministic release of WebGL resources, instead of relying on the garbage collector to destroy this object.
Once an object is destroyed, it should not be used; calling any function other than `isDestroyed` will result in a `DeveloperError` exception. Therefore, assign the return value (`undefined`) to the object as done in the example.

##### Throws:

- DeveloperError : This object was destroyed, i.e., destroy() was called.

##### Example:

    globe = globe && globe.destroy();

##### See:

- Globe#isDestroyed

#### getHeight(cartographic) → Number|undefined
Scene/Globe.js 757

Get the height of the surface at a given cartographic.

Name | Type | Description
--- | --- | ---
`cartographic` | Cartographic | The cartographic for which to find the height.

##### Returns:

The height of the cartographic or undefined if it could not be found.

#### isDestroyed() → Boolean
Scene/Globe.js 958

Returns true if this object was destroyed; otherwise, false.
If this object was destroyed, it should not be used; calling any function other than `isDestroyed` will result in a `DeveloperError` exception.

##### Returns:

True if this object was destroyed; otherwise, false.

##### See:

- Globe#destroy

#### pick(ray, scene, result) → Cartesian3|undefined
Scene/Globe.js 731

Find an intersection between a ray and the globe surface that was rendered. The ray must be given in world coordinates.

Name | Type | Description
--- | --- | ---
`ray` | Ray | The ray to test for intersection.
`scene` | Scene | The scene.
`result` | Cartesian3 | optional The object onto which to store the result.

##### Returns:

The intersection or `undefined` if none was found.

##### Example:

    // find intersection of ray through a pixel and the globe
    var ray = viewer.camera.getPickRay(windowCoordinates);
    var intersection = globe.pick(ray, scene);