bruce-cesium 4.3.4 → 4.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bruce-cesium.es5.js +37 -11
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +35 -9
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/utils/entity-utils.js +34 -8
- package/dist/lib/utils/entity-utils.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/package.json +2 -2
package/dist/bruce-cesium.umd.js
CHANGED
|
@@ -2570,11 +2570,24 @@
|
|
|
2570
2570
|
});
|
|
2571
2571
|
}); };
|
|
2572
2572
|
evaluateRecord = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
2573
|
-
var posses,
|
|
2573
|
+
var posses, assemblyLocation, latitude, longitude, pos3d_3, location, latitude, longitude, pos3d_4, geometry, pointStr, points, point, pos3d_5, lineStr, points, pPosses, pRings, boundary, points, pPosses, boundaries, point, bPosses;
|
|
2574
2574
|
return __generator(this, function (_a) {
|
|
2575
2575
|
switch (_a.label) {
|
|
2576
2576
|
case 0:
|
|
2577
2577
|
posses = [];
|
|
2578
|
+
assemblyLocation = BModels.Entity.GetValue({
|
|
2579
|
+
entity: entity,
|
|
2580
|
+
path: ["Bruce", "AssemblyLocation"]
|
|
2581
|
+
});
|
|
2582
|
+
if (assemblyLocation && typeof assemblyLocation == "object" && BModels.Carto.ValidateCarto(assemblyLocation)) {
|
|
2583
|
+
latitude = EnsureNumber(assemblyLocation.latitude);
|
|
2584
|
+
longitude = EnsureNumber(assemblyLocation.longitude);
|
|
2585
|
+
// Disallowing exact 0.
|
|
2586
|
+
if (latitude || longitude) {
|
|
2587
|
+
pos3d_3 = Cesium.Cartesian3.fromDegrees(longitude, latitude, EnsureNumber(assemblyLocation.altitude));
|
|
2588
|
+
posses.push(pos3d_3);
|
|
2589
|
+
}
|
|
2590
|
+
}
|
|
2578
2591
|
location = BModels.Entity.GetValue({
|
|
2579
2592
|
entity: entity,
|
|
2580
2593
|
path: ["Bruce", "Location"]
|
|
@@ -2584,8 +2597,8 @@
|
|
|
2584
2597
|
longitude = EnsureNumber(location.longitude);
|
|
2585
2598
|
// Disallowing exact 0.
|
|
2586
2599
|
if (latitude || longitude) {
|
|
2587
|
-
|
|
2588
|
-
posses.push(
|
|
2600
|
+
pos3d_4 = Cesium.Cartesian3.fromDegrees(longitude, latitude, EnsureNumber(location.altitude));
|
|
2601
|
+
posses.push(pos3d_4);
|
|
2589
2602
|
}
|
|
2590
2603
|
}
|
|
2591
2604
|
geometry = BModels.Entity.GetValue({
|
|
@@ -2600,8 +2613,8 @@
|
|
|
2600
2613
|
points = BModels.Geometry.ParsePoints(pointStr);
|
|
2601
2614
|
point = points.length > 0 ? points[0] : null;
|
|
2602
2615
|
if (point && BModels.Carto.ValidateCarto(point)) {
|
|
2603
|
-
|
|
2604
|
-
posses.push(
|
|
2616
|
+
pos3d_5 = Cesium.Cartesian3.fromDegrees(EnsureNumber(point.longitude), EnsureNumber(point.latitude), EnsureNumber(point.altitude));
|
|
2617
|
+
posses.push(pos3d_5);
|
|
2605
2618
|
}
|
|
2606
2619
|
}
|
|
2607
2620
|
lineStr = geometry.LineString;
|
|
@@ -2947,9 +2960,9 @@
|
|
|
2947
2960
|
if ((rego === null || rego === void 0 ? void 0 : rego.visual) instanceof Cesium.Entity) {
|
|
2948
2961
|
var visual = rego.visual;
|
|
2949
2962
|
if (visual.position) {
|
|
2950
|
-
var
|
|
2963
|
+
var pos3d_6 = GetValue(viewer, visual.position);
|
|
2951
2964
|
// Fix height reference.
|
|
2952
|
-
if (
|
|
2965
|
+
if (pos3d_6 === null || pos3d_6 === void 0 ? void 0 : pos3d_6.x) {
|
|
2953
2966
|
var visualHeightRef = Cesium.HeightReference.RELATIVE_TO_GROUND;
|
|
2954
2967
|
if (visual.model) {
|
|
2955
2968
|
visualHeightRef = GetValue(viewer, visual.model.heightReference);
|
|
@@ -2976,7 +2989,7 @@
|
|
|
2976
2989
|
return exports.DrawingUtils.EnsurePosHeight({
|
|
2977
2990
|
desiredHeightRef: params.returnHeightRef,
|
|
2978
2991
|
heightRef: visualHeightRef,
|
|
2979
|
-
pos3d:
|
|
2992
|
+
pos3d: pos3d_6,
|
|
2980
2993
|
viewer: viewer
|
|
2981
2994
|
});
|
|
2982
2995
|
}
|
|
@@ -2985,6 +2998,19 @@
|
|
|
2985
2998
|
return null;
|
|
2986
2999
|
}
|
|
2987
3000
|
function evaluateRecord() {
|
|
3001
|
+
// Checking for a pre-calculated lat/lon for assembly entities.
|
|
3002
|
+
var assemblyLocation = BModels.Entity.GetValue({
|
|
3003
|
+
entity: entity,
|
|
3004
|
+
path: ["Bruce", "AssemblyLocation"]
|
|
3005
|
+
});
|
|
3006
|
+
if (assemblyLocation && typeof assemblyLocation == "object" && BModels.Carto.ValidateCarto(assemblyLocation)) {
|
|
3007
|
+
var latitude = EnsureNumber(assemblyLocation.latitude);
|
|
3008
|
+
var longitude = EnsureNumber(assemblyLocation.longitude);
|
|
3009
|
+
// Disallowing exact 0.
|
|
3010
|
+
if (latitude || longitude) {
|
|
3011
|
+
return Cesium.Cartesian3.fromDegrees(longitude, latitude, EnsureNumber(assemblyLocation.altitude));
|
|
3012
|
+
}
|
|
3013
|
+
}
|
|
2988
3014
|
var location = BModels.Entity.GetValue({
|
|
2989
3015
|
entity: entity,
|
|
2990
3016
|
path: ["Bruce", "Location"]
|
|
@@ -26440,7 +26466,7 @@
|
|
|
26440
26466
|
ViewerUtils.AssertIonToken = AssertIonToken;
|
|
26441
26467
|
})(exports.ViewerUtils || (exports.ViewerUtils = {}));
|
|
26442
26468
|
|
|
26443
|
-
var VERSION = "4.3.
|
|
26469
|
+
var VERSION = "4.3.6";
|
|
26444
26470
|
|
|
26445
26471
|
exports.VERSION = VERSION;
|
|
26446
26472
|
exports.CesiumParabola = CesiumParabola;
|