bruce-cesium 5.1.5 → 5.1.7
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 +120 -73
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +120 -73
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/render-managers/common/shared-getters.js +2 -1
- package/dist/lib/rendering/render-managers/common/shared-getters.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-arb-render-manager.js +18 -11
- package/dist/lib/rendering/render-managers/tilesets/tileset-arb-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js +54 -37
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-entities-render-manager.js +25 -12
- package/dist/lib/rendering/render-managers/tilesets/tileset-entities-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-pointcloud-render-manager.js +24 -11
- package/dist/lib/rendering/render-managers/tilesets/tileset-pointcloud-render-manager.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/package.json +1 -1
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -15323,10 +15323,11 @@ var SharedGetters;
|
|
|
15323
15323
|
* @param call
|
|
15324
15324
|
*/
|
|
15325
15325
|
function Run(name, call) {
|
|
15326
|
+
// console.debug(`Queueing: ${name}`);
|
|
15326
15327
|
return new Promise((resolve, reject) => {
|
|
15327
15328
|
queue.push(async () => {
|
|
15328
15329
|
try {
|
|
15329
|
-
// console.debug(`
|
|
15330
|
+
// console.debug(`Running: ${name}`);
|
|
15330
15331
|
const result = await call();
|
|
15331
15332
|
resolve(result);
|
|
15332
15333
|
}
|
|
@@ -16861,48 +16862,64 @@ var TilesetCadRenderManager;
|
|
|
16861
16862
|
this.renderPriority = 0;
|
|
16862
16863
|
}
|
|
16863
16864
|
(async () => {
|
|
16864
|
-
// We don't currently read the source account ID from the cad menu item.
|
|
16865
|
-
// So we know it's always from the same account.
|
|
16866
16865
|
var _a, _b;
|
|
16867
|
-
|
|
16868
|
-
|
|
16869
|
-
|
|
16870
|
-
//
|
|
16871
|
-
//
|
|
16872
|
-
|
|
16873
|
-
|
|
16874
|
-
|
|
16875
|
-
|
|
16876
|
-
|
|
16877
|
-
|
|
16878
|
-
|
|
16879
|
-
|
|
16880
|
-
|
|
16881
|
-
|
|
16882
|
-
|
|
16883
|
-
|
|
16884
|
-
|
|
16885
|
-
|
|
16886
|
-
|
|
16887
|
-
|
|
16888
|
-
|
|
16889
|
-
|
|
16890
|
-
|
|
16891
|
-
|
|
16866
|
+
let api = this.getters.GetBruceApi();
|
|
16867
|
+
let coords = null;
|
|
16868
|
+
let tileset = null;
|
|
16869
|
+
// Single shared getter to avoid multiple assemblies fighting to render.
|
|
16870
|
+
// This lets one complete, then the next start.
|
|
16871
|
+
await SharedGetters.Queue.Run("Rendering assembly.", async () => {
|
|
16872
|
+
var _a, _b;
|
|
16873
|
+
if (this.disposed) {
|
|
16874
|
+
return;
|
|
16875
|
+
}
|
|
16876
|
+
if (tilesetId) {
|
|
16877
|
+
let canAccess = false;
|
|
16878
|
+
try {
|
|
16879
|
+
canAccess = await Tileset.Publish.IsAccessAllowed({
|
|
16880
|
+
sourceAccountId: (_a = this.item.tileset) === null || _a === void 0 ? void 0 : _a.ClientAccountID,
|
|
16881
|
+
tilesetId: tilesetId,
|
|
16882
|
+
forAccountId: this.getters.GetAccountId(),
|
|
16883
|
+
getters: this.getters
|
|
16884
|
+
});
|
|
16885
|
+
if (this.disposed) {
|
|
16886
|
+
return;
|
|
16887
|
+
}
|
|
16888
|
+
}
|
|
16889
|
+
catch (e) {
|
|
16890
|
+
console.error(e);
|
|
16891
|
+
}
|
|
16892
|
+
if (!canAccess) {
|
|
16893
|
+
console.warn(`Cannot access tileset: ${tilesetId}, from account: ${(_b = this.item.tileset) === null || _b === void 0 ? void 0 : _b.ClientAccountID}.`);
|
|
16894
|
+
return;
|
|
16895
|
+
}
|
|
16896
|
+
}
|
|
16897
|
+
else {
|
|
16898
|
+
console.warn("No tileset id found. Skipping access check.");
|
|
16899
|
+
}
|
|
16900
|
+
api = this.getters.GetBruceApi();
|
|
16901
|
+
tileset = (await Tileset.Get({
|
|
16902
|
+
api,
|
|
16903
|
+
tilesetId
|
|
16904
|
+
})).tileset;
|
|
16905
|
+
if (!tileset || this.disposed) {
|
|
16906
|
+
return;
|
|
16907
|
+
}
|
|
16908
|
+
const settings = tileset.settings;
|
|
16909
|
+
const rootId = settings.rootEntityId;
|
|
16910
|
+
this.rootId = rootId;
|
|
16911
|
+
coords = (await EntityCoords.GetEntityCoords({
|
|
16912
|
+
api,
|
|
16913
|
+
rootEntityId: rootId
|
|
16914
|
+
})).coords;
|
|
16915
|
+
if (this.disposed) {
|
|
16916
|
+
return;
|
|
16917
|
+
}
|
|
16892
16918
|
});
|
|
16893
16919
|
if (!tileset || this.disposed) {
|
|
16894
16920
|
return;
|
|
16895
16921
|
}
|
|
16896
|
-
|
|
16897
|
-
const rootId = settings.rootEntityId;
|
|
16898
|
-
this.rootId = rootId;
|
|
16899
|
-
const { coords } = await EntityCoords.GetEntityCoords({
|
|
16900
|
-
api,
|
|
16901
|
-
rootEntityId: rootId
|
|
16902
|
-
});
|
|
16903
|
-
if (this.disposed) {
|
|
16904
|
-
return;
|
|
16905
|
-
}
|
|
16922
|
+
// Render outside the shared process because we can't control file requests from Cesium.
|
|
16906
16923
|
const cTileset = this.cTileset = await TilesetRenderEngine.Render({
|
|
16907
16924
|
apiGetter: this.getters.GetBruceGetter(),
|
|
16908
16925
|
tileset: tileset,
|
|
@@ -17736,23 +17753,29 @@ var TilesetEntitiesRenderManager;
|
|
|
17736
17753
|
return;
|
|
17737
17754
|
}
|
|
17738
17755
|
(async () => {
|
|
17739
|
-
var _a, _b, _c, _d
|
|
17756
|
+
var _a, _b, _c, _d;
|
|
17740
17757
|
if (!this.cTileset) {
|
|
17741
17758
|
if (tilesetId) {
|
|
17742
17759
|
let canAccess = false;
|
|
17743
17760
|
try {
|
|
17744
|
-
|
|
17745
|
-
|
|
17746
|
-
|
|
17747
|
-
|
|
17748
|
-
|
|
17761
|
+
await SharedGetters.Queue.Run("Loading Tileset access.", async () => {
|
|
17762
|
+
var _a;
|
|
17763
|
+
if (this.disposed) {
|
|
17764
|
+
return;
|
|
17765
|
+
}
|
|
17766
|
+
canAccess = await Tileset.Publish.IsAccessAllowed({
|
|
17767
|
+
sourceAccountId: (_a = this.item.tileset) === null || _a === void 0 ? void 0 : _a.ClientAccountID,
|
|
17768
|
+
tilesetId: tilesetId,
|
|
17769
|
+
forAccountId: this.getters.GetAccountId(),
|
|
17770
|
+
getters: this.getters
|
|
17771
|
+
});
|
|
17749
17772
|
});
|
|
17750
17773
|
}
|
|
17751
17774
|
catch (e) {
|
|
17752
17775
|
console.error(e);
|
|
17753
17776
|
}
|
|
17754
17777
|
if (!canAccess) {
|
|
17755
|
-
console.warn(`Cannot access tileset: ${tilesetId}, from account: ${(
|
|
17778
|
+
console.warn(`Cannot access tileset: ${tilesetId}, from account: ${(_a = this.item.tileset) === null || _a === void 0 ? void 0 : _a.ClientAccountID}.`);
|
|
17756
17779
|
return;
|
|
17757
17780
|
}
|
|
17758
17781
|
}
|
|
@@ -17762,16 +17785,22 @@ var TilesetEntitiesRenderManager;
|
|
|
17762
17785
|
if (this.disposed || counter !== this.initCounter) {
|
|
17763
17786
|
return;
|
|
17764
17787
|
}
|
|
17765
|
-
let accountId = (
|
|
17788
|
+
let accountId = (_b = this.item.tileset) === null || _b === void 0 ? void 0 : _b.ClientAccountID;
|
|
17766
17789
|
if (!accountId) {
|
|
17767
17790
|
accountId = this.getters.GetAccountId();
|
|
17768
17791
|
}
|
|
17769
17792
|
const api = this.getters.GetBruceApi({
|
|
17770
17793
|
accountId
|
|
17771
17794
|
});
|
|
17772
|
-
|
|
17773
|
-
|
|
17774
|
-
|
|
17795
|
+
let tileset = null;
|
|
17796
|
+
await SharedGetters.Queue.Run("Loading Tileset record.", async () => {
|
|
17797
|
+
if (this.disposed) {
|
|
17798
|
+
return;
|
|
17799
|
+
}
|
|
17800
|
+
tileset = (await Tileset.Get({
|
|
17801
|
+
api,
|
|
17802
|
+
tilesetId
|
|
17803
|
+
})).tileset;
|
|
17775
17804
|
});
|
|
17776
17805
|
if (!tileset || this.disposed || counter !== this.initCounter) {
|
|
17777
17806
|
return;
|
|
@@ -17779,7 +17808,7 @@ var TilesetEntitiesRenderManager;
|
|
|
17779
17808
|
this.typeId = tileset.settings.entityTypeId;
|
|
17780
17809
|
// Other account so we'll prefer the fallback entity-type ID if it's set.
|
|
17781
17810
|
if (accountId != this.getters.GetAccountId()) {
|
|
17782
|
-
const fallbackTypeId = (
|
|
17811
|
+
const fallbackTypeId = (_d = (_c = this.item) === null || _c === void 0 ? void 0 : _c.BruceEntity) === null || _d === void 0 ? void 0 : _d["EntityType.ID"];
|
|
17783
17812
|
if (fallbackTypeId) {
|
|
17784
17813
|
this.typeId = fallbackTypeId;
|
|
17785
17814
|
}
|
|
@@ -17971,35 +18000,47 @@ var TilesetPointcloudRenderManager;
|
|
|
17971
18000
|
return;
|
|
17972
18001
|
}
|
|
17973
18002
|
(async () => {
|
|
17974
|
-
var _a, _b, _c
|
|
18003
|
+
var _a, _b, _c;
|
|
17975
18004
|
if (tilesetId) {
|
|
17976
18005
|
let canAccess = false;
|
|
17977
18006
|
try {
|
|
17978
|
-
|
|
17979
|
-
|
|
17980
|
-
|
|
17981
|
-
|
|
17982
|
-
|
|
18007
|
+
await SharedGetters.Queue.Run("Loading Tileset access.", async () => {
|
|
18008
|
+
var _a;
|
|
18009
|
+
if (this.disposed) {
|
|
18010
|
+
return;
|
|
18011
|
+
}
|
|
18012
|
+
canAccess = await Tileset.Publish.IsAccessAllowed({
|
|
18013
|
+
sourceAccountId: (_a = this.item.tileset) === null || _a === void 0 ? void 0 : _a.ClientAccountID,
|
|
18014
|
+
tilesetId: tilesetId,
|
|
18015
|
+
forAccountId: this.getters.GetAccountId(),
|
|
18016
|
+
getters: this.getters
|
|
18017
|
+
});
|
|
17983
18018
|
});
|
|
17984
18019
|
}
|
|
17985
18020
|
catch (e) {
|
|
17986
18021
|
console.error(e);
|
|
17987
18022
|
}
|
|
17988
18023
|
if (!canAccess) {
|
|
17989
|
-
console.warn(`Cannot access tileset: ${tilesetId}, from account: ${(
|
|
18024
|
+
console.warn(`Cannot access tileset: ${tilesetId}, from account: ${(_a = this.item.tileset) === null || _a === void 0 ? void 0 : _a.ClientAccountID}.`);
|
|
17990
18025
|
return;
|
|
17991
18026
|
}
|
|
17992
18027
|
}
|
|
17993
18028
|
else {
|
|
17994
18029
|
console.warn("No tileset id found. Skipping access check.");
|
|
17995
18030
|
}
|
|
17996
|
-
const accountId = (
|
|
18031
|
+
const accountId = (_c = (_b = this.item.tileset) === null || _b === void 0 ? void 0 : _b.ClientAccountID) !== null && _c !== void 0 ? _c : this.getters.GetAccountId();
|
|
17997
18032
|
const api = this.getters.GetBruceApi({
|
|
17998
18033
|
accountId: accountId
|
|
17999
18034
|
});
|
|
18000
|
-
|
|
18001
|
-
|
|
18002
|
-
|
|
18035
|
+
let tileset = null;
|
|
18036
|
+
await SharedGetters.Queue.Run("Loading Tileset record.", async () => {
|
|
18037
|
+
if (this.disposed) {
|
|
18038
|
+
return;
|
|
18039
|
+
}
|
|
18040
|
+
tileset = (await Tileset.Get({
|
|
18041
|
+
api,
|
|
18042
|
+
tilesetId
|
|
18043
|
+
})).tileset;
|
|
18003
18044
|
});
|
|
18004
18045
|
if (!tileset || this.disposed) {
|
|
18005
18046
|
return;
|
|
@@ -18239,22 +18280,28 @@ var TilesetArbRenderManager;
|
|
|
18239
18280
|
}
|
|
18240
18281
|
const tilesetId = (_c = this.item.tileset) === null || _c === void 0 ? void 0 : _c.TilesetID;
|
|
18241
18282
|
(async () => {
|
|
18242
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
18283
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
18243
18284
|
if (tilesetId) {
|
|
18244
18285
|
let canAccess = false;
|
|
18245
18286
|
try {
|
|
18246
|
-
|
|
18247
|
-
|
|
18248
|
-
|
|
18249
|
-
|
|
18250
|
-
|
|
18287
|
+
await SharedGetters.Queue.Run("Loading Tileset access.", async () => {
|
|
18288
|
+
var _a;
|
|
18289
|
+
if (this.disposed) {
|
|
18290
|
+
return;
|
|
18291
|
+
}
|
|
18292
|
+
canAccess = await Tileset.Publish.IsAccessAllowed({
|
|
18293
|
+
sourceAccountId: (_a = this.item.tileset) === null || _a === void 0 ? void 0 : _a.ClientAccountID,
|
|
18294
|
+
tilesetId: tilesetId,
|
|
18295
|
+
forAccountId: this.getters.GetAccountId(),
|
|
18296
|
+
getters: this.getters
|
|
18297
|
+
});
|
|
18251
18298
|
});
|
|
18252
18299
|
}
|
|
18253
18300
|
catch (e) {
|
|
18254
18301
|
console.error(e);
|
|
18255
18302
|
}
|
|
18256
18303
|
if (!canAccess) {
|
|
18257
|
-
console.warn(`Cannot access tileset: ${tilesetId}, from account: ${(
|
|
18304
|
+
console.warn(`Cannot access tileset: ${tilesetId}, from account: ${(_a = this.item.tileset) === null || _a === void 0 ? void 0 : _a.ClientAccountID}.`);
|
|
18258
18305
|
return;
|
|
18259
18306
|
}
|
|
18260
18307
|
}
|
|
@@ -18287,7 +18334,7 @@ var TilesetArbRenderManager;
|
|
|
18287
18334
|
if (this.disposed) {
|
|
18288
18335
|
return;
|
|
18289
18336
|
}
|
|
18290
|
-
let accountId = (
|
|
18337
|
+
let accountId = (_c = (_b = this.item) === null || _b === void 0 ? void 0 : _b.tileset) === null || _c === void 0 ? void 0 : _c.ClientAccountID;
|
|
18291
18338
|
if (!accountId) {
|
|
18292
18339
|
accountId = this.getters.GetAccountId();
|
|
18293
18340
|
}
|
|
@@ -18295,8 +18342,8 @@ var TilesetArbRenderManager;
|
|
|
18295
18342
|
apiGetter: this.getters.GetBruceGetter(),
|
|
18296
18343
|
tileset: legacyTileset,
|
|
18297
18344
|
viewer: this.viewer,
|
|
18298
|
-
ionId: (
|
|
18299
|
-
ionAccessToken: (
|
|
18345
|
+
ionId: (_d = this.item.IonResource) === null || _d === void 0 ? void 0 : _d.AssetID,
|
|
18346
|
+
ionAccessToken: (_e = this.item.IonResource) === null || _e === void 0 ? void 0 : _e.AccessToken,
|
|
18300
18347
|
loadUrl: loadUrlOverride,
|
|
18301
18348
|
accountId: accountId,
|
|
18302
18349
|
viaCdn: this.item.cdnEnabled == null ? true : Boolean(this.item.cdnEnabled),
|
|
@@ -18310,7 +18357,7 @@ var TilesetArbRenderManager;
|
|
|
18310
18357
|
tileset: tileset,
|
|
18311
18358
|
viewer: this.viewer,
|
|
18312
18359
|
coords: null,
|
|
18313
|
-
accountId: (
|
|
18360
|
+
accountId: (_g = (_f = this.item.tileset) === null || _f === void 0 ? void 0 : _f.ClientAccountID) !== null && _g !== void 0 ? _g : this.getters.GetAccountId(),
|
|
18314
18361
|
viaCdn: this.item.cdnEnabled == null ? true : Boolean(this.item.cdnEnabled)
|
|
18315
18362
|
});
|
|
18316
18363
|
}
|
|
@@ -29804,7 +29851,7 @@ class WidgetViewBar extends Widget.AWidget {
|
|
|
29804
29851
|
}
|
|
29805
29852
|
}
|
|
29806
29853
|
|
|
29807
|
-
const VERSION = "5.1.
|
|
29854
|
+
const VERSION = "5.1.7";
|
|
29808
29855
|
|
|
29809
29856
|
export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, isHistoricMetadataChanged, EntityRenderEngine, EntityRenderEnginePoint, EntityRenderEnginePolyline, EntityRenderEnginePolygon, EntityRenderEngineModel3d, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, DataLabRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, GoogleSearchRenderManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, CesiumEntityStyler, CesiumAnimatedProperty, CesiumAnimatedInOut, Draw3dPolygon, Draw3dPolyline, MeasureCreator, Walkthrough, Widget, VIEWER_BOOKMARKS_WIDGET_KEY, WidgetBookmarks, WidgetBranding, WidgetCursorBar, WidgetEmbeddedInfoView, WidgetInfoView, WidgetNavCompass$$1 as WidgetNavCompass, VIEWER_VIEW_BAR_WIDGET_KEY, WidgetViewBar, WidgetControlViewBar, WidgetControlViewBarSearch, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, WidgetLeftPanel, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks };
|
|
29810
29857
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|