Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 6.96 KB

README.md

File metadata and controls

41 lines (27 loc) · 6.96 KB

SensorShadow Class for Cesium

This repository contains the SensorShadow class for Cesium.js, a JavaScript library for creating 3D maps and globes in a web browser. The SensorShadow class allows you to create, update, and manage sensor shadow entities, including sensor shadow visualization, color coding, frustum support, and many more.

Screenshot

Demo

Sandcastle Link

Installation

This class requires the Cesium.js library. You need to install Cesium.js and import the SensorShadow class into your project.

Please refer to the official Cesium.js Installation Guide for more information on how to install and set up Cesium.js.

Usage

To create a new SensorShadow instance, you need a reference to the Cesium viewer instance and an optional configuration object. The configuration object can include various properties like cameraPosition, viewPosition, viewAreaColor, shadowAreaColor, alpha, frustum, size and depthBias.

Below is an example of how to create a new SensorShadow instance:

let sensorShadow = new SensorShadow(viewer, {
  cameraPosition: new Cartesian3(0, 0, 0),
  viewPosition: new Cartesian3(1, 1, 1),
  viewAreaColor: new Color(0, 1, 0),
  shadowAreaColor: new Color(1, 0, 0),
  alpha: 0.5,
  frustum: true,
  size: 512,
});

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

License