bruce-cesium 5.9.9 → 6.0.1

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.
@@ -1,6 +1,6 @@
1
- import { BruceEvent, Cartes, Entity as Entity$1, ProjectViewTile, Carto, Geometry, MathUtils, LRUCache, Api, Calculator, ClientFile, EntityTag, EntityType, ObjectUtils, Style, DelayQueue, EntityLod, Bounds, ZoomControl, EntityRelationType, ENVIRONMENT, EntityHistoricData, Tileset, EntityCoords, DataLab, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, AbstractApi, Session, EntityAttachment, EntityAttachmentType, EntityAttribute } from 'bruce-models';
1
+ import { BruceEvent, Cartes, Entity as Entity$1, ProjectViewTile, Carto, Geometry, MathUtils, LRUCache, Api, Calculator, ClientFile, EntityTag, EntityType, ObjectUtils, Style, DelayQueue, EntityLod, Bounds, ZoomControl, EntityRelationType, ENVIRONMENT, EntityHistoricData, Tileset, EntityCoords, DataLab, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, EntityAttachment, EntityAttachmentType, EntityAttribute, AbstractApi, Session } from 'bruce-models';
2
2
  import * as Cesium from 'cesium';
3
- import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, ClassificationType, ArcType, CornerType, ShadowMode, ConstantProperty, ConstantPositionProperty, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, HorizontalOrigin, VerticalOrigin, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, Cesium3DTileStyle, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, KmlDataSource, Quaternion, Matrix3, Matrix4, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, EllipsoidTerrainProvider, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, Cesium3DTileset, PolygonPipeline, IonResource, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, BoundingSphere, GeometryInstance, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
3
+ import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, HorizontalOrigin, VerticalOrigin, ConstantProperty, ClassificationType, ConstantPositionProperty, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, Cesium3DTileStyle, HeadingPitchRange, Cesium3DTileColorBlendMode, Ion, KmlDataSource, SceneTransforms, Quaternion, Matrix3, Matrix4, Cesium3DTileset, IonResource, EllipsoidTerrainProvider, CesiumInspector, OrthographicFrustum, defined, ClockRange, EasingFunction, NearFarScalar, PolygonPipeline, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, EllipsoidGeodesic, sampleTerrainMostDetailed, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, ScreenSpaceEventHandler, ScreenSpaceEventType, BoundingSphere, GeometryInstance, Intersect, CzmlDataSource, Fullscreen } from 'cesium';
4
4
 
5
5
  const TIME_LAG = 300;
6
6
  const POSITION_CHECK_TIMER = 950;
@@ -10744,12 +10744,22 @@ var CesiumAnimatedInOut;
10744
10744
  CesiumAnimatedInOut.AnimateOut = AnimateOut;
10745
10745
  })(CesiumAnimatedInOut || (CesiumAnimatedInOut = {}));
10746
10746
 
10747
- // Constants for update source types
10748
- const UPDATE_SOURCES = {
10749
- TREE_CASCADE: "tree-cascade",
10750
- TILESET_DISPOSE: "tileset-dispose",
10751
- OSM_TILESET_DISPOSE: "osm-tileset-dispose"
10752
- };
10747
+ // Enum for update source types
10748
+ var UpdateSource;
10749
+ (function (UpdateSource) {
10750
+ UpdateSource["TREE_CASCADE"] = "tree-cascade";
10751
+ UpdateSource["TILESET_DISPOSE"] = "tileset-dispose";
10752
+ UpdateSource["OSM_TILESET_DISPOSE"] = "osm-tileset-dispose";
10753
+ UpdateSource["ADD_REGO_REPLACE"] = "add-rego-replace";
10754
+ UpdateSource["ENTITIES_LOADED_REMOVE"] = "entities-loaded-remove";
10755
+ UpdateSource["ENTITIES_LOADED_CLEAR"] = "entities-loaded-clear";
10756
+ UpdateSource["ENTITIES_LOADED_DISPOSE"] = "entities-loaded-dispose";
10757
+ UpdateSource["ENTITIES_TAG_FILTER"] = "entities-tag-filter";
10758
+ UpdateSource["ENTITIES_DISABLED"] = "entities-disabled";
10759
+ UpdateSource["ENTITIES_DISPOSE"] = "entities-dispose";
10760
+ UpdateSource["RELATIONS_FILTER"] = "relations-filter";
10761
+ UpdateSource["RELATIONS_DISPOSE"] = "relations-dispose"; // Triggered when relations render manager is disposed.
10762
+ })(UpdateSource || (UpdateSource = {}));
10753
10763
  /**
10754
10764
  * Returns if a given visual is alive and in the scene.
10755
10765
  * @param viewer
@@ -11225,7 +11235,7 @@ var VisualsRegister;
11225
11235
  });
11226
11236
  }
11227
11237
  // Trigger update event.
11228
- if (this.onUpdate && source !== UPDATE_SOURCES.TREE_CASCADE) {
11238
+ if (this.onUpdate && source !== UpdateSource.TREE_CASCADE) {
11229
11239
  const update = {
11230
11240
  type: EVisualUpdateType.Update,
11231
11241
  entityId: state.entityId
@@ -11316,7 +11326,7 @@ var VisualsRegister;
11316
11326
  }
11317
11327
  }
11318
11328
  // Trigger update event.
11319
- if (this.onUpdate && source !== UPDATE_SOURCES.TREE_CASCADE) {
11329
+ if (this.onUpdate && source !== UpdateSource.TREE_CASCADE) {
11320
11330
  const keys = Object.keys(states);
11321
11331
  for (let i = 0; i < keys.length; i++) {
11322
11332
  const key = keys[i];
@@ -11598,7 +11608,7 @@ var VisualsRegister;
11598
11608
  if (source) {
11599
11609
  update.source = source;
11600
11610
  }
11601
- if (source !== UPDATE_SOURCES.TREE_CASCADE) {
11611
+ if (source !== UpdateSource.TREE_CASCADE) {
11602
11612
  (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
11603
11613
  }
11604
11614
  }
@@ -11764,7 +11774,7 @@ var VisualsRegister;
11764
11774
  if (source) {
11765
11775
  update.source = source;
11766
11776
  }
11767
- if (source !== UPDATE_SOURCES.TREE_CASCADE) {
11777
+ if (source !== UpdateSource.TREE_CASCADE) {
11768
11778
  (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
11769
11779
  }
11770
11780
  }
@@ -11810,7 +11820,7 @@ var VisualsRegister;
11810
11820
  if (params === null || params === void 0 ? void 0 : params.source) {
11811
11821
  update.source = params.source;
11812
11822
  }
11813
- if ((params === null || params === void 0 ? void 0 : params.source) !== UPDATE_SOURCES.TREE_CASCADE) {
11823
+ if ((params === null || params === void 0 ? void 0 : params.source) !== UpdateSource.TREE_CASCADE) {
11814
11824
  (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
11815
11825
  }
11816
11826
  if ((params === null || params === void 0 ? void 0 : params.requestRender) != false) {
@@ -11960,7 +11970,7 @@ var VisualsRegister;
11960
11970
  if (source) {
11961
11971
  update.source = source;
11962
11972
  }
11963
- if (source !== UPDATE_SOURCES.TREE_CASCADE) {
11973
+ if (source !== UpdateSource.TREE_CASCADE) {
11964
11974
  (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
11965
11975
  }
11966
11976
  }
@@ -12072,7 +12082,7 @@ var VisualsRegister;
12072
12082
  if (params === null || params === void 0 ? void 0 : params.source) {
12073
12083
  update.source = params.source;
12074
12084
  }
12075
- if ((params === null || params === void 0 ? void 0 : params.source) !== UPDATE_SOURCES.TREE_CASCADE) {
12085
+ if ((params === null || params === void 0 ? void 0 : params.source) !== UpdateSource.TREE_CASCADE) {
12076
12086
  (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
12077
12087
  }
12078
12088
  }
@@ -12088,7 +12098,7 @@ var VisualsRegister;
12088
12098
  menuItemId: rego.menuItemId,
12089
12099
  doUpdate: false,
12090
12100
  requestRender: false,
12091
- source: "add-rego-replace"
12101
+ source: UpdateSource.ADD_REGO_REPLACE
12092
12102
  });
12093
12103
  }
12094
12104
  const entityId = rego.entityId;
@@ -12112,7 +12122,7 @@ var VisualsRegister;
12112
12122
  if (source) {
12113
12123
  update.source = source;
12114
12124
  }
12115
- if (source !== UPDATE_SOURCES.TREE_CASCADE) {
12125
+ if (source !== UpdateSource.TREE_CASCADE) {
12116
12126
  (_b = this.onUpdate) === null || _b === void 0 ? void 0 : _b.Trigger(update);
12117
12127
  }
12118
12128
  if (requestRender != false) {
@@ -12234,7 +12244,7 @@ var VisualsRegister;
12234
12244
  if (source) {
12235
12245
  update.source = source;
12236
12246
  }
12237
- if (source !== UPDATE_SOURCES.TREE_CASCADE) {
12247
+ if (source !== UpdateSource.TREE_CASCADE) {
12238
12248
  (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
12239
12249
  }
12240
12250
  if (doesInclude) {
@@ -12273,7 +12283,7 @@ var VisualsRegister;
12273
12283
  if (source) {
12274
12284
  update.source = source;
12275
12285
  }
12276
- if (source !== UPDATE_SOURCES.TREE_CASCADE) {
12286
+ if (source !== UpdateSource.TREE_CASCADE) {
12277
12287
  (_b = this.onUpdate) === null || _b === void 0 ? void 0 : _b.Trigger(update);
12278
12288
  }
12279
12289
  this.rego[entityId] = entityRegos.filter(r => r.menuItemId !== menuItemId);
@@ -12308,7 +12318,7 @@ var VisualsRegister;
12308
12318
  if (source) {
12309
12319
  update.source = source;
12310
12320
  }
12311
- if (source !== UPDATE_SOURCES.TREE_CASCADE) {
12321
+ if (source !== UpdateSource.TREE_CASCADE) {
12312
12322
  (_c = this.onUpdate) === null || _c === void 0 ? void 0 : _c.Trigger(update);
12313
12323
  }
12314
12324
  if (doUpdate && menuItemId) {
@@ -12415,7 +12425,7 @@ var VisualsRegister;
12415
12425
  if (source) {
12416
12426
  update.source = source;
12417
12427
  }
12418
- if (source !== UPDATE_SOURCES.TREE_CASCADE) {
12428
+ if (source !== UpdateSource.TREE_CASCADE) {
12419
12429
  (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
12420
12430
  }
12421
12431
  this.queueUpdate({
@@ -13457,14 +13467,14 @@ var EntitiesRenderManager;
13457
13467
  this.visualsManager.RemoveRegos({
13458
13468
  menuItemId: this.item.id,
13459
13469
  retainTagIds: tagsToRender,
13460
- source: "entities-tag-filter"
13470
+ source: UpdateSource.ENTITIES_TAG_FILTER
13461
13471
  });
13462
13472
  (_j = this.clustering) === null || _j === void 0 ? void 0 : _j.Dispose();
13463
13473
  }
13464
13474
  else {
13465
13475
  this.visualsManager.RemoveRegos({
13466
13476
  menuItemId: this.item.id,
13467
- source: "entities-disabled"
13477
+ source: UpdateSource.ENTITIES_DISABLED
13468
13478
  });
13469
13479
  (_k = this.clustering) === null || _k === void 0 ? void 0 : _k.Dispose();
13470
13480
  return;
@@ -13606,7 +13616,7 @@ var EntitiesRenderManager;
13606
13616
  this.disposed = true;
13607
13617
  this.visualsManager.RemoveRegos({
13608
13618
  menuItemId: this.item.id,
13609
- source: "entities-dispose"
13619
+ source: UpdateSource.ENTITIES_DISPOSE
13610
13620
  });
13611
13621
  (_a = this.entityCheckRemoval) === null || _a === void 0 ? void 0 : _a.call(this);
13612
13622
  (_b = this.viewMonitorRemoval) === null || _b === void 0 ? void 0 : _b.call(this);
@@ -14467,7 +14477,7 @@ var EntitiesLoadedRenderManager;
14467
14477
  this.visualsManager.RemoveRegos({
14468
14478
  entityId: x,
14469
14479
  menuItemId: this.item.id,
14470
- source: "entities-loaded-remove"
14480
+ source: UpdateSource.ENTITIES_LOADED_REMOVE
14471
14481
  });
14472
14482
  this.renderedEntities[x] = false;
14473
14483
  });
@@ -14484,7 +14494,7 @@ var EntitiesLoadedRenderManager;
14484
14494
  this.item.BruceEntity.Entities = [];
14485
14495
  this.visualsManager.RemoveRegos({
14486
14496
  menuItemId: this.item.id,
14487
- source: "entities-loaded-clear"
14497
+ source: UpdateSource.ENTITIES_LOADED_CLEAR
14488
14498
  });
14489
14499
  this.renderedEntities = {};
14490
14500
  this.recreateGetter();
@@ -14549,7 +14559,7 @@ var EntitiesLoadedRenderManager;
14549
14559
  this.disposed = true;
14550
14560
  this.visualsManager.RemoveRegos({
14551
14561
  menuItemId: this.item.id,
14552
- source: "entities-loaded-dispose"
14562
+ source: UpdateSource.ENTITIES_LOADED_DISPOSE
14553
14563
  });
14554
14564
  for (let i = 0; i < this.sources.length; i++) {
14555
14565
  const source = this.sources[i];
@@ -18749,7 +18759,7 @@ var TilesetCadRenderManager;
18749
18759
  requestRender: false,
18750
18760
  menuItemId: this.item.id,
18751
18761
  doRemove: false,
18752
- source: UPDATE_SOURCES.TILESET_DISPOSE
18762
+ source: UpdateSource.TILESET_DISPOSE
18753
18763
  });
18754
18764
  // Might have to do something smarter since siblings could still be OK.
18755
18765
  this.loadedCesiumEntities[rego.entityId] = null;
@@ -19033,7 +19043,7 @@ var TilesetCadRenderManager;
19033
19043
  this.visualsManager.RemoveRegos({
19034
19044
  menuItemId: this.item.id,
19035
19045
  doRemove: false,
19036
- source: UPDATE_SOURCES.TILESET_DISPOSE
19046
+ source: UpdateSource.TILESET_DISPOSE
19037
19047
  });
19038
19048
  this.viewerDateTimeDispose();
19039
19049
  }
@@ -19534,7 +19544,7 @@ var TilesetOsmRenderManager;
19534
19544
  }
19535
19545
  this.visualsManager.RemoveRegos({
19536
19546
  menuItemId: this.item.id,
19537
- source: UPDATE_SOURCES.OSM_TILESET_DISPOSE
19547
+ source: UpdateSource.OSM_TILESET_DISPOSE
19538
19548
  });
19539
19549
  this.featureQueue = [];
19540
19550
  }
@@ -20728,7 +20738,7 @@ var RelationsRenderManager;
20728
20738
  entityId: rego.entityId,
20729
20739
  menuItemId: this.item.id,
20730
20740
  requestRender: false,
20731
- source: "relations-filter"
20741
+ source: UpdateSource.RELATIONS_FILTER
20732
20742
  });
20733
20743
  }
20734
20744
  }
@@ -20776,7 +20786,7 @@ var RelationsRenderManager;
20776
20786
  this.disposed = true;
20777
20787
  this.register.RemoveRegos({
20778
20788
  menuItemId: this.item.id,
20779
- source: "relations-dispose"
20789
+ source: UpdateSource.RELATIONS_DISPOSE
20780
20790
  });
20781
20791
  }
20782
20792
  /**
@@ -21037,7 +21047,7 @@ var RelationsRenderManager;
21037
21047
  menuItemId: this.item.id,
21038
21048
  relation: relation,
21039
21049
  requestRender: false,
21040
- source: "relations-filter"
21050
+ source: UpdateSource.RELATIONS_FILTER
21041
21051
  });
21042
21052
  }
21043
21053
  const key = RelationRenderEngine.GetRenderGroupId(relation);
@@ -33316,7 +33326,7 @@ class WidgetViewBar extends Widget.AWidget {
33316
33326
  }
33317
33327
  }
33318
33328
 
33319
- const VERSION = "5.9.9";
33329
+ const VERSION = "6.0.1";
33320
33330
 
33321
- export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, isOutlineChanged, EntityRenderEngine, EntityRenderEnginePoint, EntityRenderEnginePolyline, EntityRenderEnginePolygon, EntityRenderEngineModel3d, MenuItemCreator, UPDATE_SOURCES, VisualsRegister, RenderManager, EntitiesIdsRenderManager, DataLabRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, GoogleSearchRenderManager, AssemblyRenderManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, CESIUM_TIMELINE_LIVE_KEY, CESIUM_TIMELINE_LIVE_PADDING_KEY, CESIUM_TIMELINE_INTERVAL_KEY, DEFAULT_LIVE_PADDING_SECONDS, 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 };
33331
+ export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, isOutlineChanged, EntityRenderEngine, EntityRenderEnginePoint, EntityRenderEnginePolyline, EntityRenderEnginePolygon, EntityRenderEngineModel3d, MenuItemCreator, UpdateSource, VisualsRegister, RenderManager, EntitiesIdsRenderManager, DataLabRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, GoogleSearchRenderManager, AssemblyRenderManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, CESIUM_TIMELINE_LIVE_KEY, CESIUM_TIMELINE_LIVE_PADDING_KEY, CESIUM_TIMELINE_INTERVAL_KEY, DEFAULT_LIVE_PADDING_SECONDS, 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 };
33322
33332
  //# sourceMappingURL=bruce-cesium.es5.js.map