1.0.0 • Published 1 year ago

cesium-sensors-es6 v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
1 year ago

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

Compatibility

As of Cesium version 1.102 the default webgl contexts uses webgl2 and therefore the custom shaders in the library need to be aligned. for this reason , version 0.x are compatible with WebGL1 shader whiler versions 1.x and above with webGL2 i.e. cesium versions above 1.102 use the library version according to your cesium version.

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.

import * as Cesium from 'cesium';
import * as CesiumSensorVolumes from 'cesium-sensors-es6';
// 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)
);

License

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

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.

1.0.0

1 year ago

0.3.0

2 years ago

0.2.1

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.5

2 years ago

0.2.4

2 years ago

0.2.0

5 years ago

0.1.0

5 years ago