OrbPro2 a Cesium distribution

NightLayerController

new Cesium.NightLayerController(viewer, nightLayer, options)

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.
Name Type Default Description
fadeStart number 70000 optional Altitude (meters) at which night layer is fully visible.
fadeEnd number 50000 optional Altitude (meters) at which night layer is fully transparent.
brightness number 2.0 optional Brightness multiplier for the night layer.
contrast number 1.2 optional Contrast adjustment for the night layer.
gamma number 0.6 optional Gamma correction for the night layer (creates glow effect).
saturation number 1.2 optional Color saturation for the night layer.
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.
Gets the controlled night imagery layer.
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.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.