bruce-cesium 2.7.6 → 2.7.8
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 +51 -44
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +50 -43
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/entity-render-engine.js +29 -25
- package/dist/lib/rendering/entity-render-engine.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-arb-render-manager.js +17 -16
- package/dist/lib/rendering/render-managers/tilesets/tileset-arb-render-manager.js.map +1 -1
- package/dist/lib/rendering/tileset-render-engine.js +3 -1
- package/dist/lib/rendering/tileset-render-engine.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/tileset-render-engine.d.ts +1 -0
- package/package.json +2 -2
package/dist/bruce-cesium.umd.js
CHANGED
|
@@ -2644,6 +2644,10 @@
|
|
|
2644
2644
|
if (width < 0.01) {
|
|
2645
2645
|
width = 0;
|
|
2646
2646
|
}
|
|
2647
|
+
var units = style.lineWidthUnits;
|
|
2648
|
+
if (units != "px" && units != "m") {
|
|
2649
|
+
units = "m";
|
|
2650
|
+
}
|
|
2647
2651
|
// If both outline and fill is not available then don't render anything.
|
|
2648
2652
|
if ((width <= 0 || cLineColor.alpha <= 0) &&
|
|
2649
2653
|
cFillColor.alpha <= 0) {
|
|
@@ -2683,7 +2687,7 @@
|
|
|
2683
2687
|
classificationType: classification,
|
|
2684
2688
|
perPositionHeight: heightRef == Cesium.HeightReference.CLAMP_TO_GROUND ? false : true,
|
|
2685
2689
|
zIndex: zIndex,
|
|
2686
|
-
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance, size, true)
|
|
2690
|
+
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance, width <= 0 || !cLineColor || units == "m" ? size : null, true)
|
|
2687
2691
|
},
|
|
2688
2692
|
position: exports.EntityUtils.GetPos({
|
|
2689
2693
|
viewer: params.viewer,
|
|
@@ -2719,17 +2723,17 @@
|
|
|
2719
2723
|
borderPosses = posses.map(function (x) { return x.clone ? x.clone() : __assign({}, x); });
|
|
2720
2724
|
}
|
|
2721
2725
|
var cEntityBorder = new Cesium.Entity({
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
corridor: {
|
|
2726
|
+
polyline: units == "px" ? new Cesium.PolylineGraphics({
|
|
2727
|
+
positions: borderPosses,
|
|
2728
|
+
material: cLineColor,
|
|
2729
|
+
width: width,
|
|
2730
|
+
clampToGround: heightRef == Cesium.HeightReference.CLAMP_TO_GROUND,
|
|
2731
|
+
classificationType: Cesium.ClassificationType.TERRAIN,
|
|
2732
|
+
arcType: Cesium.ArcType.GEODESIC,
|
|
2733
|
+
zIndex: zIndex,
|
|
2734
|
+
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance)
|
|
2735
|
+
}) : null,
|
|
2736
|
+
corridor: units == "m" ? {
|
|
2733
2737
|
positions: borderPosses,
|
|
2734
2738
|
material: cLineColor,
|
|
2735
2739
|
heightReference: heightRef,
|
|
@@ -2741,7 +2745,7 @@
|
|
|
2741
2745
|
classificationType: classification,
|
|
2742
2746
|
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance, width),
|
|
2743
2747
|
shadows: Cesium.ShadowMode.ENABLED
|
|
2744
|
-
},
|
|
2748
|
+
} : null,
|
|
2745
2749
|
show: true
|
|
2746
2750
|
});
|
|
2747
2751
|
cEntityBorder._parentEntity = cEntity;
|
|
@@ -2750,17 +2754,17 @@
|
|
|
2750
2754
|
var posses_1 = holePosses[i];
|
|
2751
2755
|
bruceModels.Cartes.CloseRing3(posses_1);
|
|
2752
2756
|
var cEntityHole = new Cesium.Entity({
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
corridor: {
|
|
2757
|
+
polyline: units == "px" ? new Cesium.PolylineGraphics({
|
|
2758
|
+
positions: posses_1,
|
|
2759
|
+
material: cLineColor,
|
|
2760
|
+
width: width,
|
|
2761
|
+
clampToGround: heightRef == Cesium.HeightReference.CLAMP_TO_GROUND,
|
|
2762
|
+
classificationType: Cesium.ClassificationType.TERRAIN,
|
|
2763
|
+
arcType: Cesium.ArcType.GEODESIC,
|
|
2764
|
+
zIndex: zIndex,
|
|
2765
|
+
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance)
|
|
2766
|
+
}) : null,
|
|
2767
|
+
corridor: units == "m" ? {
|
|
2764
2768
|
positions: borderPosses,
|
|
2765
2769
|
material: cLineColor,
|
|
2766
2770
|
heightReference: heightRef,
|
|
@@ -2772,7 +2776,7 @@
|
|
|
2772
2776
|
classificationType: classification,
|
|
2773
2777
|
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance, width),
|
|
2774
2778
|
shadows: Cesium.ShadowMode.ENABLED,
|
|
2775
|
-
},
|
|
2779
|
+
} : null,
|
|
2776
2780
|
show: true
|
|
2777
2781
|
});
|
|
2778
2782
|
cEntity._siblingGraphics.push(cEntityHole);
|
|
@@ -6898,7 +6902,9 @@
|
|
|
6898
6902
|
etc = settings.etc;
|
|
6899
6903
|
etc = __assign({}, etc);
|
|
6900
6904
|
if (!ionId) return [3 /*break*/, 2];
|
|
6901
|
-
return [4 /*yield*/, Cesium.IonResource.fromAssetId(EnsureNumber(ionId)
|
|
6905
|
+
return [4 /*yield*/, Cesium.IonResource.fromAssetId(EnsureNumber(ionId), {
|
|
6906
|
+
accessToken: params.ionAccessToken ? params.ionAccessToken : Cesium.Ion.defaultAccessToken
|
|
6907
|
+
})];
|
|
6902
6908
|
case 1:
|
|
6903
6909
|
loadUrl = (_a.sent());
|
|
6904
6910
|
return [3 /*break*/, 3];
|
|
@@ -8803,15 +8809,15 @@
|
|
|
8803
8809
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
8804
8810
|
var canAccess, e_3, _a, tileset, type, _b, LEGACY_TYPES, legacyTileset, _c, accountId, _d, _e;
|
|
8805
8811
|
var _this = this;
|
|
8806
|
-
var _f, _g, _h, _j, _k, _l, _m;
|
|
8807
|
-
return __generator(this, function (
|
|
8808
|
-
switch (
|
|
8812
|
+
var _f, _g, _h, _j, _k, _l, _m, _o;
|
|
8813
|
+
return __generator(this, function (_p) {
|
|
8814
|
+
switch (_p.label) {
|
|
8809
8815
|
case 0:
|
|
8810
8816
|
if (!tilesetId) return [3 /*break*/, 5];
|
|
8811
8817
|
canAccess = false;
|
|
8812
|
-
|
|
8818
|
+
_p.label = 1;
|
|
8813
8819
|
case 1:
|
|
8814
|
-
|
|
8820
|
+
_p.trys.push([1, 3, , 4]);
|
|
8815
8821
|
return [4 /*yield*/, bruceModels.Tileset.Publish.IsAccessAllowed({
|
|
8816
8822
|
sourceAccountId: (_f = this.item.tileset) === null || _f === void 0 ? void 0 : _f.ClientAccountID,
|
|
8817
8823
|
tilesetId: tilesetId,
|
|
@@ -8819,10 +8825,10 @@
|
|
|
8819
8825
|
api: this.getters.GetGlobalApi()
|
|
8820
8826
|
})];
|
|
8821
8827
|
case 2:
|
|
8822
|
-
canAccess =
|
|
8828
|
+
canAccess = _p.sent();
|
|
8823
8829
|
return [3 /*break*/, 4];
|
|
8824
8830
|
case 3:
|
|
8825
|
-
e_3 =
|
|
8831
|
+
e_3 = _p.sent();
|
|
8826
8832
|
console.error(e_3);
|
|
8827
8833
|
return [3 /*break*/, 4];
|
|
8828
8834
|
case 4:
|
|
@@ -8833,7 +8839,7 @@
|
|
|
8833
8839
|
return [3 /*break*/, 6];
|
|
8834
8840
|
case 5:
|
|
8835
8841
|
console.warn("No tileset id found. Skipping access check.");
|
|
8836
|
-
|
|
8842
|
+
_p.label = 6;
|
|
8837
8843
|
case 6:
|
|
8838
8844
|
if (!tilesetId) return [3 /*break*/, 8];
|
|
8839
8845
|
return [4 /*yield*/, getTileset({
|
|
@@ -8841,11 +8847,11 @@
|
|
|
8841
8847
|
menuItem: this.item
|
|
8842
8848
|
})];
|
|
8843
8849
|
case 7:
|
|
8844
|
-
_b =
|
|
8850
|
+
_b = _p.sent();
|
|
8845
8851
|
return [3 /*break*/, 9];
|
|
8846
8852
|
case 8:
|
|
8847
8853
|
_b = { tileset: null, type: null };
|
|
8848
|
-
|
|
8854
|
+
_p.label = 9;
|
|
8849
8855
|
case 9:
|
|
8850
8856
|
_a = _b, tileset = _a.tileset, type = _a.type;
|
|
8851
8857
|
if (this.disposed) {
|
|
@@ -8868,11 +8874,11 @@
|
|
|
8868
8874
|
tileset: tileset
|
|
8869
8875
|
})];
|
|
8870
8876
|
case 10:
|
|
8871
|
-
_c =
|
|
8877
|
+
_c = _p.sent();
|
|
8872
8878
|
return [3 /*break*/, 12];
|
|
8873
8879
|
case 11:
|
|
8874
8880
|
_c = null;
|
|
8875
|
-
|
|
8881
|
+
_p.label = 12;
|
|
8876
8882
|
case 12:
|
|
8877
8883
|
legacyTileset = _c;
|
|
8878
8884
|
if (this.disposed) {
|
|
@@ -8888,12 +8894,13 @@
|
|
|
8888
8894
|
tileset: legacyTileset,
|
|
8889
8895
|
viewer: this.viewer,
|
|
8890
8896
|
ionId: (_k = this.item.IonResource) === null || _k === void 0 ? void 0 : _k.AssetID,
|
|
8897
|
+
ionAccessToken: (_l = this.item.IonResource) === null || _l === void 0 ? void 0 : _l.AccessToken,
|
|
8891
8898
|
loadUrl: loadUrlOverride,
|
|
8892
8899
|
accountId: accountId,
|
|
8893
8900
|
viaCdn: true
|
|
8894
8901
|
})];
|
|
8895
8902
|
case 13:
|
|
8896
|
-
_d.cTileset =
|
|
8903
|
+
_d.cTileset = _p.sent();
|
|
8897
8904
|
return [3 /*break*/, 16];
|
|
8898
8905
|
case 14:
|
|
8899
8906
|
if (!tileset) return [3 /*break*/, 16];
|
|
@@ -8903,13 +8910,13 @@
|
|
|
8903
8910
|
tileset: tileset,
|
|
8904
8911
|
viewer: this.viewer,
|
|
8905
8912
|
coords: null,
|
|
8906
|
-
accountId: (
|
|
8913
|
+
accountId: (_o = (_m = this.item.tileset) === null || _m === void 0 ? void 0 : _m.ClientAccountID) !== null && _o !== void 0 ? _o : this.getters.GetAccountId(),
|
|
8907
8914
|
// Not doing viaCDN here because I fear it'll break something since this is a legacy menu item type.
|
|
8908
8915
|
viaCdn: false
|
|
8909
8916
|
})];
|
|
8910
8917
|
case 15:
|
|
8911
|
-
_e.cTileset =
|
|
8912
|
-
|
|
8918
|
+
_e.cTileset = _p.sent();
|
|
8919
|
+
_p.label = 16;
|
|
8913
8920
|
case 16:
|
|
8914
8921
|
if (this.disposed) {
|
|
8915
8922
|
this.doDispose();
|
|
@@ -15235,7 +15242,7 @@
|
|
|
15235
15242
|
ViewerUtils.CreateWidgets = CreateWidgets;
|
|
15236
15243
|
})(exports.ViewerUtils || (exports.ViewerUtils = {}));
|
|
15237
15244
|
|
|
15238
|
-
var VERSION$1 = "2.7.
|
|
15245
|
+
var VERSION$1 = "2.7.8";
|
|
15239
15246
|
|
|
15240
15247
|
exports.VERSION = VERSION$1;
|
|
15241
15248
|
exports.CesiumViewMonitor = CesiumViewMonitor;
|