bruce-cesium 7.0.5 → 7.0.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.
@@ -1,6 +1,6 @@
1
1
  import * as Cesium from 'cesium';
2
- import { Cartographic, ColorMaterialProperty, Entity, Color, ConstantProperty, CallbackProperty, Primitive, Cesium3DTileFeature, Math as Math$1, Cartesian3, JulianDate, Quaternion, Transforms, HeadingPitchRoll, Matrix4, DistanceDisplayCondition, HeightReference, HorizontalOrigin, VerticalOrigin, ClassificationType, ConstantPositionProperty, ImageMaterialProperty, PolygonHierarchy, ShadowMode, PolylineGraphics, ArcType, CornerType, ColorBlendMode, Model, SceneTransforms, NearFarScalar, Cartesian2, Matrix3, Rectangle, KmlDataSource, GeoJsonDataSource, SceneMode, Cesium3DTileStyle, HeadingPitchRange, Cesium3DTileColorBlendMode, Ion, IonResource, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, OrthographicFrustum, EasingFunction, Cesium3DTileset, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, PolygonPipeline, CustomDataSource, BoundingSphere, GeometryInstance, CesiumInspector, ClockRange, ScreenSpaceEventHandler, ScreenSpaceEventType, Fullscreen, Intersect, CzmlDataSource } from 'cesium';
3
- import { Cartes, Entity as Entity$1, ENVIRONMENT, Api, Calculator, ClientFile, EntityTag, EntityType, LRUCache, ObjectUtils, Style, Bounds, Color as Color$1, Geometry, EntityLod, Carto, MenuItem, ProjectView, ProjectViewBookmark, Tileset, ZoomControl, BruceEvent, EntityCoords, DataLab, DelayQueue, EntityHistoricData, AccountConcept, RecordChangeFeed, EntityRelation, BruceApi, ProgramKey, EntitySource, ProjectViewLegacyTile, ProjectViewTile, Camera, EntityAttachment, EntityAttachmentType, EntityAttribute, MathUtils, Session, EntityRelationType } from 'bruce-models';
2
+ import { Cartographic, ColorMaterialProperty, Entity, Color, ConstantProperty, CallbackProperty, Primitive, Cesium3DTileFeature, DistanceDisplayCondition, Math as Math$1, Cartesian3, JulianDate, Quaternion, Transforms, HeadingPitchRoll, Matrix4, HeightReference, ColorBlendMode, ShadowMode, ClassificationType, Model, HorizontalOrigin, VerticalOrigin, ConstantPositionProperty, ArcType, CornerType, ImageMaterialProperty, PolygonHierarchy, PolylineGraphics, Cartesian2, SceneTransforms, NearFarScalar, Matrix3, Rectangle, KmlDataSource, GeoJsonDataSource, SceneMode, Cesium3DTileStyle, HeadingPitchRange, Cesium3DTileColorBlendMode, Ion, IonResource, Cesium3DTileset, OrthographicFrustum, EasingFunction, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, PolygonPipeline, BoundingSphere, GeometryInstance, CesiumInspector, ClockRange, CustomDataSource, ScreenSpaceEventHandler, ScreenSpaceEventType, Fullscreen, Intersect, CzmlDataSource } from 'cesium';
3
+ import { Cartes, Entity as Entity$1, ENVIRONMENT, Calculator, ClientFile, EntityLod, EntityTag, EntityType, LRUCache, ObjectUtils, Style, Api, Carto, Geometry, Bounds, Color as Color$1, MenuItem, ProjectView, ProjectViewBookmark, Tileset, ZoomControl, BruceEvent, EntityCoords, DataLab, DelayQueue, EntityHistoricData, AccountConcept, RecordChangeFeed, BruceApi, EntityRelation, ProgramKey, EntitySource, Camera, ProjectViewTile, ProjectViewLegacyTile, Session, EntityAttachment, EntityAttachmentType, EntityAttribute, MathUtils, EntityRelationType } from 'bruce-models';
4
4
 
5
5
  /**
6
6
  * Ensures a number is returned from a given value.
@@ -6376,7 +6376,7 @@ function isCullingIgnored(viewer, rego) {
6376
6376
  rego.editing == true ||
6377
6377
  // Part of a collection we did not create, eg. a geojson data source, which may have its own rules for
6378
6378
  // what is in the scene. Our own per-menu-item data sources are fair game.
6379
- (rego.collection && !IsCCollectionOwned(rego.collection)) ||
6379
+ VisualsRegister.IsForeignCollection(rego) ||
6380
6380
  // We won't cull historic records as they may be interpolating their locations.
6381
6381
  Boolean(rego.outline && rego.outline.some(x => !!x.DateTime))) {
6382
6382
  return true;
@@ -6664,6 +6664,7 @@ var VisualRegisterCuller;
6664
6664
  VisualRegisterCuller.IsCullingIgnored = IsCullingIgnored;
6665
6665
  /**
6666
6666
  * Discards what the culler knows about an entity's extent, so its next check measures the geometry again.
6667
+ * The last cull decision is deliberately kept, see the loop below.
6667
6668
  * @param visuals an entity, an entity id, or an array of either.
6668
6669
  */
6669
6670
  function InvalidateBounds(visuals) {
@@ -6687,8 +6688,6 @@ var VisualRegisterCuller;
6687
6688
  continue;
6688
6689
  }
6689
6690
  ids.push(part.id);
6690
- // The per-entity answer is derived from the sphere, so it goes stale with it.
6691
- delete part[VisualRegisterCuller.VISUAL_CULL_KEY];
6692
6691
  }
6693
6692
  }
6694
6693
  invalidateBounds(ids);
@@ -7068,6 +7067,13 @@ function isBlankState(state) {
7068
7067
  */
7069
7068
  var VisualsRegister;
7070
7069
  (function (VisualsRegister) {
7070
+ /**
7071
+ * Whether a visual lives in a collection somebody else owns, eg. a geojson or KML data source that manages its own scene membership.
7072
+ */
7073
+ function IsForeignCollection(rego) {
7074
+ return Boolean(rego === null || rego === void 0 ? void 0 : rego.collection) && !IsCCollectionOwned(rego.collection);
7075
+ }
7076
+ VisualsRegister.IsForeignCollection = IsForeignCollection;
7071
7077
  let EVisualUpdateType;
7072
7078
  (function (EVisualUpdateType) {
7073
7079
  EVisualUpdateType["Add"] = "ADD";
@@ -8209,6 +8215,7 @@ var VisualsRegister;
8209
8215
  else {
8210
8216
  // The geometry almost certainly moved, so what was measured before is worthless.
8211
8217
  VisualRegisterCuller.InvalidateBounds(rego.visual);
8218
+ VisualRegisterCuller.MarkShouldRecheck(this.viewer);
8212
8219
  }
8213
8220
  }
8214
8221
  }
@@ -40415,7 +40422,7 @@ var StyleUtils;
40415
40422
  StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
40416
40423
  })(StyleUtils || (StyleUtils = {}));
40417
40424
 
40418
- const VERSION = "7.0.5";
40425
+ const VERSION = "7.0.7";
40419
40426
  /**
40420
40427
  * Updates the environment instance used by bruce-cesium to one specified.
40421
40428
  * This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.