bruce-cesium 6.1.7 → 6.1.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.
@@ -1,6 +1,6 @@
1
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, HorizontalOrigin, VerticalOrigin, ConstantProperty, ClassificationType, ConstantPositionProperty, DistanceDisplayCondition, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, SceneMode, Primitive, Cesium3DTileFeature, GeoJsonDataSource, Cesium3DTileStyle, HeadingPitchRange, Cesium3DTileColorBlendMode, Ion, KmlDataSource, Quaternion, Matrix3, Matrix4, SceneTransforms, NearFarScalar, OrthographicFrustum, EasingFunction, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, IonResource, Cesium3DTileset, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, ScreenSpaceEventHandler, ScreenSpaceEventType, BoundingSphere, GeometryInstance, 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, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, KmlDataSource, Quaternion, Matrix3, Matrix4, SceneTransforms, NearFarScalar, OrthographicFrustum, EasingFunction, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, IonResource, Cesium3DTileset, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
4
4
 
5
5
  const TIME_LAG = 300;
6
6
  const POSITION_CHECK_TIMER = 950;
@@ -16305,6 +16305,7 @@ class TilesetStyler {
16305
16305
  // Once the style is loaded, we can queue the set for styling.
16306
16306
  this.stylePendingEntityIds = new Map();
16307
16307
  this.fallbackStyle = null;
16308
+ this.styleFallbackLoaded = false;
16308
16309
  this.loadingCounter = 0;
16309
16310
  // Entity IDs -> boolean to indicate if we should override the feature colour.
16310
16311
  this.overrideFeatureColor = new Map();
@@ -16542,6 +16543,7 @@ class TilesetStyler {
16542
16543
  var _a, _b;
16543
16544
  const counter = ++this.loadingCounter;
16544
16545
  this.styleMappingLoaded = false;
16546
+ this.styleFallbackLoaded = false;
16545
16547
  this.styleMappingsLoaded.clear();
16546
16548
  // Apply state changes.
16547
16549
  this.entityGatherer.Empty();
@@ -16553,7 +16555,11 @@ class TilesetStyler {
16553
16555
  api: this.api,
16554
16556
  styleId: fallbackStyleId
16555
16557
  });
16558
+ if (this.loadingCounter != counter) {
16559
+ return;
16560
+ }
16556
16561
  this.fallbackStyle = data;
16562
+ this.styleFallbackLoaded = true;
16557
16563
  }
16558
16564
  catch (e) {
16559
16565
  console.error(e);
@@ -16661,7 +16667,17 @@ class TilesetStyler {
16661
16667
  // then we can pass them to the gatherer now.
16662
16668
  const relatedIds = this.stylePendingEntityIds.get(styleMap.EntityTypeID);
16663
16669
  if (relatedIds) {
16664
- this.entityGatherer.Queue(Array.from(relatedIds));
16670
+ if (this.getTilesetFeatureNeedsFullData(styleMap.EntityTypeID)) {
16671
+ this.entityGatherer.Queue(Array.from(relatedIds));
16672
+ }
16673
+ else {
16674
+ relatedIds.forEach(id => {
16675
+ const rego = this.getEntityRego(id);
16676
+ if (rego) {
16677
+ this.styleTilesetFeature(rego);
16678
+ }
16679
+ });
16680
+ }
16665
16681
  this.stylePendingEntityIds.delete(styleMap.EntityTypeID);
16666
16682
  }
16667
16683
  }
@@ -16677,9 +16693,19 @@ class TilesetStyler {
16677
16693
  // Queue all Entities that are pending styling.
16678
16694
  const pendingKeys = this.stylePendingEntityIds.keys();
16679
16695
  for (const key of pendingKeys) {
16680
- const relatedIds = this.stylePendingEntityIds[key];
16696
+ const relatedIds = this.stylePendingEntityIds.get(key);
16681
16697
  if (relatedIds) {
16682
- this.entityGatherer.Queue(Array.from(relatedIds));
16698
+ if (this.getTilesetFeatureNeedsFullData(key)) {
16699
+ this.entityGatherer.Queue(Array.from(relatedIds));
16700
+ }
16701
+ else {
16702
+ relatedIds.forEach(id => {
16703
+ const rego = this.getEntityRego(id);
16704
+ if (rego) {
16705
+ this.styleTilesetFeature(rego);
16706
+ }
16707
+ });
16708
+ }
16683
16709
  }
16684
16710
  }
16685
16711
  this.stylePendingEntityIds.clear();
@@ -16725,6 +16751,14 @@ class TilesetStyler {
16725
16751
  this.styleTilesetFeature(rego);
16726
16752
  }
16727
16753
  }
16754
+ else if (!this.styleMappingsLoaded.has(typeId) && this.styleFallbackLoaded) {
16755
+ if (this.getTilesetFeatureNeedsFullData(typeId)) {
16756
+ needsDataIds.push(rego.entityId);
16757
+ }
16758
+ else {
16759
+ this.styleTilesetFeature(rego);
16760
+ }
16761
+ }
16728
16762
  else {
16729
16763
  if (!this.stylePendingEntityIds.has(typeId)) {
16730
16764
  this.stylePendingEntityIds.set(typeId, new Set());
@@ -33767,7 +33801,7 @@ class WidgetViewBar extends Widget.AWidget {
33767
33801
  }
33768
33802
  }
33769
33803
 
33770
- const VERSION = "6.1.7";
33804
+ const VERSION = "6.1.8";
33771
33805
 
33772
33806
  export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, isOutlineChanged, EntityRenderEngine, EntityRenderEnginePoint, EntityRenderEnginePolyline, EntityRenderEnginePolygon, EntityRenderEngineModel3d, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, DataLabRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, GoogleSearchRenderManager, AssemblyRenderManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, LiveCursor, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, CESIUM_TIMELINE_LIVE_KEY, CESIUM_TIMELINE_LIVE_PADDING_KEY, CESIUM_TIMELINE_INTERVAL_KEY, CESIUM_MODEL_SPACE_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 };
33773
33807
  //# sourceMappingURL=bruce-cesium.es5.js.map