Manages a night imagery layer with altitude-based fading.
The night layer becomes fully visible at high altitudes and fades out
as the camera descends below a configurable threshold.
| Name | Type | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
viewer |
Viewer | The viewer instance. | ||||||||||||||||||||||||||||
nightLayer |
ImageryLayer | The night imagery layer to control. | ||||||||||||||||||||||||||||
options |
object |
optional
Configuration options.
|
Example:
const nightProvider = Cesium.EmbeddedImageryProvider.createBlackMarble();
const nightLayer = viewer.imageryLayers.addImageryProvider(nightProvider);
const controller = new Cesium.NightLayerController(viewer, nightLayer, {
fadeStart: 70000,
fadeEnd: 50000,
brightness: 2.0
});
Members
Gets or sets the altitude (in meters) at which the night layer is fully transparent.
Gets or sets the altitude (in meters) at which the night layer is fully visible.
readonly nightLayer : ImageryLayer
Gets the controlled night imagery layer.
readonly viewer : Viewer
Gets the viewer instance.
Methods
Destroys this controller and removes the preRender listener.
Returns true if this object was destroyed; otherwise, false.
Returns:
True if this object was destroyed; otherwise, false.