A Cesium plugin for visualizing sensor volumes. Based on cesium-sensors and evolved to support more recent Cesium versions and typescript typings.
$ npm install --save cesium-sensors-es6
Prebuilt minified and unminified versions of the plugin are in the dist directory.
The plugin automatically adds support for the CZML properties agi_conicSensor
, agi_customPatternSensor
, and agi_rectangularSensor
. The corresponding Entity
properties are conicSensor
, customPatternSensor
, and rectangularSensor
.
In order to load data directly into Entity
objects that you create directly, you must call entity.addProperty
to create each of the sensor properties you wish to use. The CZML processing does this automatically.
<script src="path/to/Cesium.js"></script>
<script src="path/to/cesium-sensors-es6.cjs.development.js"></script>
<script>
// To create an entity directly
var entityCollection = new Cesium.EntityCollection();
var entity = entityCollection.getOrCreateEntity('test');
entity.addProperty('conicSensor');
// configure other entity properties, e.g. position and orientation...
entity.conicSensor = new CesiumSensorVolumes.ConicSensorGraphics();
entity.conicSensor.intersectionColor = new Cesium.ConstantProperty(new Cesium.Color(0.1, 0.2, 0.3, 0.4));
</script>
MIT Free for commercial and non-commercial use. See LICENSE.md.
This project was bootstrapped with TSDX.
Below is a list of commands you will probably find useful.
Runs the project in development/watch mode. Your project will be rebuilt upon changes. TSDX has a special logger for you convenience. Error messages are pretty printed and formatted for compatibility VS Code's Problems tab.
Your library will be rebuilt if you make edits.
Bundles the package to the dist
folder.
The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module).
Runs the test watcher (Jest) in an interactive mode. By default, runs tests related to files changed since the last commit.