cesium-sensors-es6
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

cesium-sensors-es6

npm version

A Cesium plugin for visualizing sensor volumes. Based on cesium-sensors and evolved to support more recent Cesium versions and typescript typings.

Install

$ npm install --save cesium-sensors-es6

Usage

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>

License

MIT Free for commercial and non-commercial use. See LICENSE.md.

TSDX Bootstrap

This project was bootstrapped with TSDX.

Local Development

Below is a list of commands you will probably find useful.

npm start or yarn start

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.

npm run build or yarn build

Bundles the package to the dist folder. The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module).

npm test or yarn test

Runs the test watcher (Jest) in an interactive mode. By default, runs tests related to files changed since the last commit.

Readme

Keywords

none

Package Sidebar

Install

npm i cesium-sensors-es6

Weekly Downloads

26

Version

0.3.0

License

MIT

Unpacked Size

700 kB

Total Files

40

Last publish

Collaborators

  • raulns86