bruce-cesium 4.8.2 → 4.8.4

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
1
  import { BruceEvent, Cartes, Entity as Entity$1, Carto, Geometry, MathUtils, LRUCache, Api, Calculator, ClientFile, EntityTag, EntityType, ObjectUtils, Style, ProjectViewTile, DelayQueue, EntityLod, Bounds, ZoomControl, EntityRelationType, ENVIRONMENT, EntityHistoricData, Tileset, EntityCoords, DataLab, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, AbstractApi, Session, EntityAttribute, EntityAttachment, EntityAttachmentType } 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, HorizontalOrigin, VerticalOrigin, ColorBlendMode, HeadingPitchRoll, Transforms, Model, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, Cesium3DTileStyle, Ion, KmlDataSource, OrthographicFrustum, EasingFunction, NearFarScalar, SceneTransforms, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, Cesium3DTileset, Matrix4, Matrix3, IonResource, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, PolygonPipeline, CesiumInspector, ClockRange, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, BoundingSphere, GeometryInstance, Quaternion, 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, ColorBlendMode, HeadingPitchRoll, Transforms, Model, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, SceneMode, Primitive, Cesium3DTileFeature, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, Cesium3DTileStyle, Ion, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, Cesium3DTileset, PolygonPipeline, Matrix4, Matrix3, IonResource, BoundingSphere, GeometryInstance, Quaternion, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
4
4
 
5
5
  /*! *****************************************************************************
6
6
  Copyright (c) Microsoft Corporation. All rights reserved.
@@ -15148,6 +15148,7 @@ var TilesetRenderEngine;
15148
15148
  TilesetRenderEngine.RenderLegacy = RenderLegacy;
15149
15149
  var Styler = /** @class */ (function () {
15150
15150
  function Styler() {
15151
+ var _this = this;
15151
15152
  this.disposed = false;
15152
15153
  // Indicates if the styler has been loaded/initialized and is ready to style.
15153
15154
  this.loaded = false;
@@ -15170,6 +15171,9 @@ var TilesetRenderEngine;
15170
15171
  // % progress for how many Entities have been styled so far.
15171
15172
  // This can change as Tiles load in and more queue.
15172
15173
  this._styleProgress = 0;
15174
+ this._styleProgressQueue = new DelayQueue(function () {
15175
+ _this.updateStyleProgress();
15176
+ }, 250);
15173
15177
  // Event for when the style progress changes.
15174
15178
  this.OnStyleProgress = new BruceEvent();
15175
15179
  }
@@ -15208,7 +15212,7 @@ var TilesetRenderEngine;
15208
15212
  if (fallbackStyleId != null) {
15209
15213
  this.fallbackStyleId = fallbackStyleId;
15210
15214
  }
15211
- if (this.styleMapping) {
15215
+ if (styleMapping) {
15212
15216
  this.styleMapping = styleMapping;
15213
15217
  if (this.styleMapping) {
15214
15218
  // Dereference.
@@ -15285,7 +15289,7 @@ var TilesetRenderEngine;
15285
15289
  menuItemId: this.menuItemId
15286
15290
  });
15287
15291
  // Reset progress.
15288
- this.updateStyleProgress();
15292
+ this._styleProgressQueue.Call(true);
15289
15293
  this.styleMappingLoaded = false;
15290
15294
  this.styleMappingsLoaded = {};
15291
15295
  this.QueueEntities(regos);
@@ -15412,6 +15416,9 @@ var TilesetRenderEngine;
15412
15416
  * Calculates the current progress % and updates the progress if there is a change.
15413
15417
  */
15414
15418
  Styler.prototype.updateStyleProgress = function () {
15419
+ if (this.disposed) {
15420
+ return;
15421
+ }
15415
15422
  var progress = 100; // Done when idling.
15416
15423
  if (this.recordCheckQueue.length || this.recordLoadQueue.length) {
15417
15424
  var total = Object.keys(this.styledEntityIds).length;
@@ -15449,6 +15456,7 @@ var TilesetRenderEngine;
15449
15456
  this.disposed = true;
15450
15457
  clearInterval(this.queueLoadInterval);
15451
15458
  clearInterval(this.queueCheckInterval);
15459
+ this._styleProgressQueue.Dispose();
15452
15460
  };
15453
15461
  Styler.prototype.loadStyles = function () {
15454
15462
  var _a, _b;
@@ -15756,7 +15764,7 @@ var TilesetRenderEngine;
15756
15764
  override: override
15757
15765
  });
15758
15766
  this.styledEntityIds[entity.entityId] = true;
15759
- this.updateStyleProgress();
15767
+ this._styleProgressQueue.Call();
15760
15768
  // Since we only need to update it for scenarios right now.
15761
15769
  // We'll avoid doing it if not needed, eg: first render and no scenario (same state as default).
15762
15770
  if (this.shouldUpdateRegoStates && (override || ((_b = data === null || data === void 0 ? void 0 : data.Bruce) === null || _b === void 0 ? void 0 : _b.Scenario))) {
@@ -28713,7 +28721,7 @@ var WidgetViewBar = /** @class */ (function (_super) {
28713
28721
  return WidgetViewBar;
28714
28722
  }(Widget.AWidget));
28715
28723
 
28716
- var VERSION = "4.8.2";
28724
+ var VERSION = "4.8.4";
28717
28725
 
28718
28726
  export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, 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, 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 };
28719
28727
  //# sourceMappingURL=bruce-cesium.es5.js.map