Skip to content

Commit 037c681

Browse files
committed
Upgrade to Cesium 1.99 and add dist files
1 parent 5d9aef5 commit 037c681

6 files changed

+12682
-79
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@
55
.tmp/
66
coverage/
77
node_modules/
8-
package-lock.json

dist/cesium-sensor-volumes.es.js

+37-37
Original file line numberDiff line numberDiff line change
@@ -777,15 +777,15 @@ function removePrimitive(entity, hash, primitives) {
777777
}
778778
}
779779

780-
const defaultIntersectionColor = Color.WHITE;
781-
const defaultIntersectionWidth = 1.0;
782-
const defaultRadius = Number.POSITIVE_INFINITY;
780+
const defaultIntersectionColor$2 = Color.WHITE;
781+
const defaultIntersectionWidth$2 = 1.0;
782+
const defaultRadius$2 = Number.POSITIVE_INFINITY;
783783

784-
const matrix3Scratch = new Matrix3();
785-
const cachedPosition = new Cartesian3();
786-
const cachedOrientation = new Quaternion();
784+
const matrix3Scratch$2 = new Matrix3();
785+
const cachedPosition$2 = new Cartesian3();
786+
const cachedOrientation$2 = new Quaternion();
787787

788-
function assignSpherical(index, array, clock, cone) {
788+
function assignSpherical$1(index, array, clock, cone) {
789789
var spherical = array[index];
790790
if (!defined(spherical)) {
791791
spherical = new Spherical();
@@ -806,21 +806,21 @@ function computeDirections(primitive, minimumClockAngle, maximumClockAngle, inne
806806
// No clock angle limits, so this is just a circle.
807807
// There might be a hole but we're ignoring it for now.
808808
for (angle = 0.0; angle < CesiumMath.TWO_PI; angle += angleStep) {
809-
assignSpherical(i++, directions, angle, outerHalfAngle);
809+
assignSpherical$1(i++, directions, angle, outerHalfAngle);
810810
}
811811
} else {
812812
// There are clock angle limits.
813813
for (angle = minimumClockAngle; angle < maximumClockAngle; angle += angleStep) {
814-
assignSpherical(i++, directions, angle, outerHalfAngle);
814+
assignSpherical$1(i++, directions, angle, outerHalfAngle);
815815
}
816-
assignSpherical(i++, directions, maximumClockAngle, outerHalfAngle);
816+
assignSpherical$1(i++, directions, maximumClockAngle, outerHalfAngle);
817817
if (innerHalfAngle) {
818818
for (angle = maximumClockAngle; angle > minimumClockAngle; angle -= angleStep) {
819-
assignSpherical(i++, directions, angle, innerHalfAngle);
819+
assignSpherical$1(i++, directions, angle, innerHalfAngle);
820820
}
821-
assignSpherical(i++, directions, minimumClockAngle, innerHalfAngle);
821+
assignSpherical$1(i++, directions, minimumClockAngle, innerHalfAngle);
822822
} else {
823-
assignSpherical(i++, directions, maximumClockAngle, 0.0);
823+
assignSpherical$1(i++, directions, maximumClockAngle, 0.0);
824824
}
825825
}
826826
directions.length = i;
@@ -884,8 +884,8 @@ ConicSensorVisualizer.prototype.update = function(time) {
884884
var show = entity.isShowing && entity.isAvailable(time) && Property.getValueOrDefault(conicSensorGraphics._show, time, true);
885885

886886
if (show) {
887-
position = Property.getValueOrUndefined(entity._position, time, cachedPosition);
888-
orientation = Property.getValueOrUndefined(entity._orientation, time, cachedOrientation);
887+
position = Property.getValueOrUndefined(entity._position, time, cachedPosition$2);
888+
orientation = Property.getValueOrUndefined(entity._orientation, time, cachedOrientation$2);
889889
show = defined(position) && defined(orientation);
890890
}
891891

@@ -916,7 +916,7 @@ ConicSensorVisualizer.prototype.update = function(time) {
916916
}
917917

918918
if (!Cartesian3.equals(position, data.position) || !Quaternion.equals(orientation, data.orientation)) {
919-
Matrix4.fromRotationTranslation(Matrix3.fromQuaternion(orientation, matrix3Scratch), position, primitive.modelMatrix);
919+
Matrix4.fromRotationTranslation(Matrix3.fromQuaternion(orientation, matrix3Scratch$2), position, primitive.modelMatrix);
920920
data.position = Cartesian3.clone(position, data.position);
921921
data.orientation = Quaternion.clone(orientation, data.orientation);
922922
}
@@ -939,10 +939,10 @@ ConicSensorVisualizer.prototype.update = function(time) {
939939
data.minimumClockAngle = minimumClockAngle;
940940
}
941941

942-
primitive.radius = Property.getValueOrDefault(conicSensorGraphics._radius, time, defaultRadius);
942+
primitive.radius = Property.getValueOrDefault(conicSensorGraphics._radius, time, defaultRadius$2);
943943
primitive.lateralSurfaceMaterial = MaterialProperty.getValue(time, conicSensorGraphics._lateralSurfaceMaterial, primitive.lateralSurfaceMaterial);
944-
primitive.intersectionColor = Property.getValueOrClonedDefault(conicSensorGraphics._intersectionColor, time, defaultIntersectionColor, primitive.intersectionColor);
945-
primitive.intersectionWidth = Property.getValueOrDefault(conicSensorGraphics._intersectionWidth, time, defaultIntersectionWidth);
944+
primitive.intersectionColor = Property.getValueOrClonedDefault(conicSensorGraphics._intersectionColor, time, defaultIntersectionColor$2, primitive.intersectionColor);
945+
primitive.intersectionWidth = Property.getValueOrDefault(conicSensorGraphics._intersectionWidth, time, defaultIntersectionWidth$2);
946946
}
947947
return true;
948948
};
@@ -1446,7 +1446,7 @@ RectangularSensorGraphics.prototype.merge = function(source) {
14461446
this.lateralSurfaceMaterial = defaultValue(this.lateralSurfaceMaterial, source.lateralSurfaceMaterial);
14471447
};
14481448

1449-
function assignSpherical$1(index, array, clock, cone) {
1449+
function assignSpherical(index, array, clock, cone) {
14501450
var spherical = array[index];
14511451
if (!defined(spherical)) {
14521452
spherical = new Spherical();
@@ -1466,10 +1466,10 @@ function updateDirections(rectangularSensor) {
14661466
var theta = Math.atan(tanX / tanY);
14671467
var cone = Math.atan(Math.sqrt((tanX * tanX) + (tanY * tanY)));
14681468

1469-
assignSpherical$1(0, directions, theta, cone);
1470-
assignSpherical$1(1, directions, CesiumMath.toRadians(180.0) - theta, cone);
1471-
assignSpherical$1(2, directions, CesiumMath.toRadians(180.0) + theta, cone);
1472-
assignSpherical$1(3, directions, -theta, cone);
1469+
assignSpherical(0, directions, theta, cone);
1470+
assignSpherical(1, directions, CesiumMath.toRadians(180.0) - theta, cone);
1471+
assignSpherical(2, directions, CesiumMath.toRadians(180.0) + theta, cone);
1472+
assignSpherical(3, directions, -theta, cone);
14731473

14741474
directions.length = 4;
14751475
rectangularSensor._customSensor.directions = directions;
@@ -1611,13 +1611,13 @@ RectangularPyramidSensorVolume.prototype.destroy = function() {
16111611
return destroyObject(this);
16121612
};
16131613

1614-
const defaultIntersectionColor$2 = Color.WHITE;
1615-
const defaultIntersectionWidth$2 = 1.0;
1616-
const defaultRadius$2 = Number.POSITIVE_INFINITY;
1614+
const defaultIntersectionColor = Color.WHITE;
1615+
const defaultIntersectionWidth = 1.0;
1616+
const defaultRadius = Number.POSITIVE_INFINITY;
16171617

1618-
const matrix3Scratch$2 = new Matrix3();
1619-
const cachedPosition$2 = new Cartesian3();
1620-
const cachedOrientation$2 = new Quaternion();
1618+
const matrix3Scratch = new Matrix3();
1619+
const cachedPosition = new Cartesian3();
1620+
const cachedOrientation = new Quaternion();
16211621

16221622
/**
16231623
* A {@link Visualizer} which maps {@link Entity#rectangularSensor} to a {@link RectangularSensor}.
@@ -1676,8 +1676,8 @@ RectangularSensorVisualizer.prototype.update = function(time) {
16761676
var show = entity.isShowing && entity.isAvailable(time) && Property.getValueOrDefault(rectangularSensorGraphics._show, time, true);
16771677

16781678
if (show) {
1679-
position = Property.getValueOrUndefined(entity._position, time, cachedPosition$2);
1680-
orientation = Property.getValueOrUndefined(entity._orientation, time, cachedOrientation$2);
1679+
position = Property.getValueOrUndefined(entity._position, time, cachedPosition);
1680+
orientation = Property.getValueOrUndefined(entity._orientation, time, cachedOrientation);
16811681
show = defined(position) && defined(orientation);
16821682
}
16831683

@@ -1704,18 +1704,18 @@ RectangularSensorVisualizer.prototype.update = function(time) {
17041704
}
17051705

17061706
if (!Cartesian3.equals(position, data.position) || !Quaternion.equals(orientation, data.orientation)) {
1707-
Matrix4.fromRotationTranslation(Matrix3.fromQuaternion(orientation, matrix3Scratch$2), position, primitive.modelMatrix);
1707+
Matrix4.fromRotationTranslation(Matrix3.fromQuaternion(orientation, matrix3Scratch), position, primitive.modelMatrix);
17081708
data.position = Cartesian3.clone(position, data.position);
17091709
data.orientation = Quaternion.clone(orientation, data.orientation);
17101710
}
17111711

17121712
primitive.show = true;
17131713
primitive.xHalfAngle = Property.getValueOrDefault(rectangularSensorGraphics._xHalfAngle, time, CesiumMath.PI_OVER_TWO);
17141714
primitive.yHalfAngle = Property.getValueOrDefault(rectangularSensorGraphics._yHalfAngle, time, CesiumMath.PI_OVER_TWO);
1715-
primitive.radius = Property.getValueOrDefault(rectangularSensorGraphics._radius, time, defaultRadius$2);
1715+
primitive.radius = Property.getValueOrDefault(rectangularSensorGraphics._radius, time, defaultRadius);
17161716
primitive.lateralSurfaceMaterial = MaterialProperty.getValue(time, rectangularSensorGraphics._lateralSurfaceMaterial, primitive.lateralSurfaceMaterial);
1717-
primitive.intersectionColor = Property.getValueOrClonedDefault(rectangularSensorGraphics._intersectionColor, time, defaultIntersectionColor$2, primitive.intersectionColor);
1718-
primitive.intersectionWidth = Property.getValueOrDefault(rectangularSensorGraphics._intersectionWidth, time, defaultIntersectionWidth$2);
1717+
primitive.intersectionColor = Property.getValueOrClonedDefault(rectangularSensorGraphics._intersectionColor, time, defaultIntersectionColor, primitive.intersectionColor);
1718+
primitive.intersectionWidth = Property.getValueOrDefault(rectangularSensorGraphics._intersectionWidth, time, defaultIntersectionWidth);
17191719
}
17201720
return true;
17211721
};
@@ -1954,4 +1954,4 @@ var cesiumSensorVolumes = {
19541954
RectangularSensorVisualizer
19551955
};
19561956

1957-
export default cesiumSensorVolumes;
1957+
export { cesiumSensorVolumes as default };

dist/cesium-sensor-volumes.es.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cesium-sensor-volumes.js

+38-38
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
33
typeof define === 'function' && define.amd ? define(factory) :
44
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.CesiumSensorVolumes = factory());
5-
}(this, (function () { 'use strict';
5+
})(this, (function () { 'use strict';
66

77
/**
88
* Cesium Sensor Volumes - https://github.com/Flowm/cesium-sensor-volumes
@@ -783,15 +783,15 @@
783783
}
784784
}
785785

786-
const defaultIntersectionColor = Color.WHITE;
787-
const defaultIntersectionWidth = 1.0;
788-
const defaultRadius = Number.POSITIVE_INFINITY;
786+
const defaultIntersectionColor$2 = Color.WHITE;
787+
const defaultIntersectionWidth$2 = 1.0;
788+
const defaultRadius$2 = Number.POSITIVE_INFINITY;
789789

790-
const matrix3Scratch = new Matrix3();
791-
const cachedPosition = new Cartesian3();
792-
const cachedOrientation = new Quaternion();
790+
const matrix3Scratch$2 = new Matrix3();
791+
const cachedPosition$2 = new Cartesian3();
792+
const cachedOrientation$2 = new Quaternion();
793793

794-
function assignSpherical(index, array, clock, cone) {
794+
function assignSpherical$1(index, array, clock, cone) {
795795
var spherical = array[index];
796796
if (!defined(spherical)) {
797797
spherical = new Spherical();
@@ -812,21 +812,21 @@
812812
// No clock angle limits, so this is just a circle.
813813
// There might be a hole but we're ignoring it for now.
814814
for (angle = 0.0; angle < CesiumMath.TWO_PI; angle += angleStep) {
815-
assignSpherical(i++, directions, angle, outerHalfAngle);
815+
assignSpherical$1(i++, directions, angle, outerHalfAngle);
816816
}
817817
} else {
818818
// There are clock angle limits.
819819
for (angle = minimumClockAngle; angle < maximumClockAngle; angle += angleStep) {
820-
assignSpherical(i++, directions, angle, outerHalfAngle);
820+
assignSpherical$1(i++, directions, angle, outerHalfAngle);
821821
}
822-
assignSpherical(i++, directions, maximumClockAngle, outerHalfAngle);
822+
assignSpherical$1(i++, directions, maximumClockAngle, outerHalfAngle);
823823
if (innerHalfAngle) {
824824
for (angle = maximumClockAngle; angle > minimumClockAngle; angle -= angleStep) {
825-
assignSpherical(i++, directions, angle, innerHalfAngle);
825+
assignSpherical$1(i++, directions, angle, innerHalfAngle);
826826
}
827-
assignSpherical(i++, directions, minimumClockAngle, innerHalfAngle);
827+
assignSpherical$1(i++, directions, minimumClockAngle, innerHalfAngle);
828828
} else {
829-
assignSpherical(i++, directions, maximumClockAngle, 0.0);
829+
assignSpherical$1(i++, directions, maximumClockAngle, 0.0);
830830
}
831831
}
832832
directions.length = i;
@@ -890,8 +890,8 @@
890890
var show = entity.isShowing && entity.isAvailable(time) && Property.getValueOrDefault(conicSensorGraphics._show, time, true);
891891

892892
if (show) {
893-
position = Property.getValueOrUndefined(entity._position, time, cachedPosition);
894-
orientation = Property.getValueOrUndefined(entity._orientation, time, cachedOrientation);
893+
position = Property.getValueOrUndefined(entity._position, time, cachedPosition$2);
894+
orientation = Property.getValueOrUndefined(entity._orientation, time, cachedOrientation$2);
895895
show = defined(position) && defined(orientation);
896896
}
897897

@@ -922,7 +922,7 @@
922922
}
923923

924924
if (!Cartesian3.equals(position, data.position) || !Quaternion.equals(orientation, data.orientation)) {
925-
Matrix4.fromRotationTranslation(Matrix3.fromQuaternion(orientation, matrix3Scratch), position, primitive.modelMatrix);
925+
Matrix4.fromRotationTranslation(Matrix3.fromQuaternion(orientation, matrix3Scratch$2), position, primitive.modelMatrix);
926926
data.position = Cartesian3.clone(position, data.position);
927927
data.orientation = Quaternion.clone(orientation, data.orientation);
928928
}
@@ -945,10 +945,10 @@
945945
data.minimumClockAngle = minimumClockAngle;
946946
}
947947

948-
primitive.radius = Property.getValueOrDefault(conicSensorGraphics._radius, time, defaultRadius);
948+
primitive.radius = Property.getValueOrDefault(conicSensorGraphics._radius, time, defaultRadius$2);
949949
primitive.lateralSurfaceMaterial = MaterialProperty.getValue(time, conicSensorGraphics._lateralSurfaceMaterial, primitive.lateralSurfaceMaterial);
950-
primitive.intersectionColor = Property.getValueOrClonedDefault(conicSensorGraphics._intersectionColor, time, defaultIntersectionColor, primitive.intersectionColor);
951-
primitive.intersectionWidth = Property.getValueOrDefault(conicSensorGraphics._intersectionWidth, time, defaultIntersectionWidth);
950+
primitive.intersectionColor = Property.getValueOrClonedDefault(conicSensorGraphics._intersectionColor, time, defaultIntersectionColor$2, primitive.intersectionColor);
951+
primitive.intersectionWidth = Property.getValueOrDefault(conicSensorGraphics._intersectionWidth, time, defaultIntersectionWidth$2);
952952
}
953953
return true;
954954
};
@@ -1452,7 +1452,7 @@
14521452
this.lateralSurfaceMaterial = defaultValue(this.lateralSurfaceMaterial, source.lateralSurfaceMaterial);
14531453
};
14541454

1455-
function assignSpherical$1(index, array, clock, cone) {
1455+
function assignSpherical(index, array, clock, cone) {
14561456
var spherical = array[index];
14571457
if (!defined(spherical)) {
14581458
spherical = new Spherical();
@@ -1472,10 +1472,10 @@
14721472
var theta = Math.atan(tanX / tanY);
14731473
var cone = Math.atan(Math.sqrt((tanX * tanX) + (tanY * tanY)));
14741474

1475-
assignSpherical$1(0, directions, theta, cone);
1476-
assignSpherical$1(1, directions, CesiumMath.toRadians(180.0) - theta, cone);
1477-
assignSpherical$1(2, directions, CesiumMath.toRadians(180.0) + theta, cone);
1478-
assignSpherical$1(3, directions, -theta, cone);
1475+
assignSpherical(0, directions, theta, cone);
1476+
assignSpherical(1, directions, CesiumMath.toRadians(180.0) - theta, cone);
1477+
assignSpherical(2, directions, CesiumMath.toRadians(180.0) + theta, cone);
1478+
assignSpherical(3, directions, -theta, cone);
14791479

14801480
directions.length = 4;
14811481
rectangularSensor._customSensor.directions = directions;
@@ -1617,13 +1617,13 @@
16171617
return destroyObject(this);
16181618
};
16191619

1620-
const defaultIntersectionColor$2 = Color.WHITE;
1621-
const defaultIntersectionWidth$2 = 1.0;
1622-
const defaultRadius$2 = Number.POSITIVE_INFINITY;
1620+
const defaultIntersectionColor = Color.WHITE;
1621+
const defaultIntersectionWidth = 1.0;
1622+
const defaultRadius = Number.POSITIVE_INFINITY;
16231623

1624-
const matrix3Scratch$2 = new Matrix3();
1625-
const cachedPosition$2 = new Cartesian3();
1626-
const cachedOrientation$2 = new Quaternion();
1624+
const matrix3Scratch = new Matrix3();
1625+
const cachedPosition = new Cartesian3();
1626+
const cachedOrientation = new Quaternion();
16271627

16281628
/**
16291629
* A {@link Visualizer} which maps {@link Entity#rectangularSensor} to a {@link RectangularSensor}.
@@ -1682,8 +1682,8 @@
16821682
var show = entity.isShowing && entity.isAvailable(time) && Property.getValueOrDefault(rectangularSensorGraphics._show, time, true);
16831683

16841684
if (show) {
1685-
position = Property.getValueOrUndefined(entity._position, time, cachedPosition$2);
1686-
orientation = Property.getValueOrUndefined(entity._orientation, time, cachedOrientation$2);
1685+
position = Property.getValueOrUndefined(entity._position, time, cachedPosition);
1686+
orientation = Property.getValueOrUndefined(entity._orientation, time, cachedOrientation);
16871687
show = defined(position) && defined(orientation);
16881688
}
16891689

@@ -1710,18 +1710,18 @@
17101710
}
17111711

17121712
if (!Cartesian3.equals(position, data.position) || !Quaternion.equals(orientation, data.orientation)) {
1713-
Matrix4.fromRotationTranslation(Matrix3.fromQuaternion(orientation, matrix3Scratch$2), position, primitive.modelMatrix);
1713+
Matrix4.fromRotationTranslation(Matrix3.fromQuaternion(orientation, matrix3Scratch), position, primitive.modelMatrix);
17141714
data.position = Cartesian3.clone(position, data.position);
17151715
data.orientation = Quaternion.clone(orientation, data.orientation);
17161716
}
17171717

17181718
primitive.show = true;
17191719
primitive.xHalfAngle = Property.getValueOrDefault(rectangularSensorGraphics._xHalfAngle, time, CesiumMath.PI_OVER_TWO);
17201720
primitive.yHalfAngle = Property.getValueOrDefault(rectangularSensorGraphics._yHalfAngle, time, CesiumMath.PI_OVER_TWO);
1721-
primitive.radius = Property.getValueOrDefault(rectangularSensorGraphics._radius, time, defaultRadius$2);
1721+
primitive.radius = Property.getValueOrDefault(rectangularSensorGraphics._radius, time, defaultRadius);
17221722
primitive.lateralSurfaceMaterial = MaterialProperty.getValue(time, rectangularSensorGraphics._lateralSurfaceMaterial, primitive.lateralSurfaceMaterial);
1723-
primitive.intersectionColor = Property.getValueOrClonedDefault(rectangularSensorGraphics._intersectionColor, time, defaultIntersectionColor$2, primitive.intersectionColor);
1724-
primitive.intersectionWidth = Property.getValueOrDefault(rectangularSensorGraphics._intersectionWidth, time, defaultIntersectionWidth$2);
1723+
primitive.intersectionColor = Property.getValueOrClonedDefault(rectangularSensorGraphics._intersectionColor, time, defaultIntersectionColor, primitive.intersectionColor);
1724+
primitive.intersectionWidth = Property.getValueOrDefault(rectangularSensorGraphics._intersectionWidth, time, defaultIntersectionWidth);
17251725
}
17261726
return true;
17271727
};
@@ -1962,4 +1962,4 @@
19621962

19631963
return cesiumSensorVolumes;
19641964

1965-
})));
1965+
}));

0 commit comments

Comments
 (0)