效果

动态雷达传感器

攻击线

动态扩散点

示例

动态雷达传感器

开源插件,推荐使用时直接升级添加到项目中

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import Cesium from "Cesium";

import {RectangularSensorPrimitive} from "./RectangularSensor/RectangularSensorPrimitive";
import {RectangularSensorGraphics} from "./RectangularSensor/RectangularSensorGraphics";
import {RectangularSensorVisualizer} from './RectangularSensor/RectangularSensorVisualizer';

//conicSensor
import {ConicArcSensorGeometry} from './ConicArcSensor/ConicArcSensorGeometry';
import {ConicArcSensorOutlineGeometry} from './ConicArcSensor/ConicArcSensorOutlineGeometry';
import {ConicArcSensorGraphics} from './ConicArcSensor/ConicArcSensorGraphics';
import {ConicArcSensorCollection} from './ConicArcSensor/ConicArcSensorCollection';


//rectangularSensor
Cesium.RectangularSensorPrimitive = RectangularSensorPrimitive;
Cesium.RectangularSensorGraphics = RectangularSensorGraphics;
Cesium.RectangularSensorVisualizer = RectangularSensorVisualizer;

//conicSensor
Cesium.ConicArcSensorGeometry = ConicArcSensorGeometry;
Cesium.ConicArcSensorOutlineGeometry = ConicArcSensorOutlineGeometry;
Cesium.ConicArcSensorGraphics = ConicArcSensorGraphics;
Cesium.ConicArcSensorCollection = ConicArcSensorCollection;


var DataSourceDisplay = Cesium.DataSourceDisplay;
var originalDefaultVisualizersCallback = DataSourceDisplay.defaultVisualizersCallback;
DataSourceDisplay.defaultVisualizersCallback = function (scene, entityCluster, dataSource) {
var entities = dataSource.entities;
var array = originalDefaultVisualizersCallback(scene, entityCluster, dataSource);
return array.concat([
new RectangularSensorVisualizer(scene, entities)
]);
};

支持升级到1.5X ,如需升级到1.6更改import导入方式,不支持直接导入。

开源地址:github地址