bruce-cesium 7.0.3 → 7.0.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 * as Cesium from 'cesium';
2
- import { Cartographic, Entity, DistanceDisplayCondition, ColorMaterialProperty, Color, Math as Math$1, Cartesian3, JulianDate, Quaternion, Transforms, HeadingPitchRoll, Matrix4, ClassificationType, ArcType, HeightReference, CornerType, ShadowMode, ConstantProperty, ConstantPositionProperty, CallbackProperty, HorizontalOrigin, VerticalOrigin, Primitive, Cesium3DTileFeature, ColorBlendMode, Model, ImageMaterialProperty, PolygonHierarchy, PolylineGraphics, Cartesian2, SceneTransforms, NearFarScalar, Matrix3, Rectangle, KmlDataSource, GeoJsonDataSource, SceneMode, Cesium3DTileStyle, HeadingPitchRange, Ion, IonResource, OrthographicFrustum, EasingFunction, Cesium3DTileColorBlendMode, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, Cesium3DTileset, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, PolygonPipeline, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, CesiumInspector, ClockRange, BoundingSphere, GeometryInstance, ScreenSpaceEventHandler, ScreenSpaceEventType, CustomDataSource, Fullscreen, Intersect, CzmlDataSource } from 'cesium';
3
- import { Cartes, Entity as Entity$1, ENVIRONMENT, Calculator, Carto, EntityTag, EntityType, Geometry, ObjectUtils, Style, Api, ClientFile, LRUCache, EntityLod, MenuItem, ProjectView, ProjectViewBookmark, Tileset, ZoomControl, BruceEvent, EntityCoords, Bounds, Color as Color$1, DataLab, DelayQueue, EntityHistoricData, EntityRelation, AccountConcept, RecordChangeFeed, BruceApi, ProgramKey, EntitySource, Camera, ProjectViewTile, ProjectViewLegacyTile, Session, EntityAttachment, EntityAttachmentType, EntityAttribute, MathUtils, EntityRelationType } from 'bruce-models';
2
+ import { Cartographic, Entity, Color, HeightReference, CallbackProperty, HorizontalOrigin, VerticalOrigin, ConstantProperty, Cartesian3, ClassificationType, ConstantPositionProperty, ArcType, CornerType, ShadowMode, ColorBlendMode, HeadingPitchRoll, Math as Math$1, Transforms, Model, ColorMaterialProperty, Primitive, Cesium3DTileFeature, Cartesian2, DistanceDisplayCondition, SceneTransforms, NearFarScalar, JulianDate, Quaternion, Matrix3, Rectangle, KmlDataSource, ImageMaterialProperty, PolygonHierarchy, PolylineGraphics, GeoJsonDataSource, SceneMode, Ion, IonResource, Cesium3DTileStyle, HeadingPitchRange, Cesium3DTileColorBlendMode, Matrix4, OrthographicFrustum, EasingFunction, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, PolygonPipeline, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, Cesium3DTileset, CesiumInspector, ClockRange, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, CustomDataSource, ScreenSpaceEventHandler, ScreenSpaceEventType, BoundingSphere, GeometryInstance, Fullscreen, Intersect, CzmlDataSource } from 'cesium';
3
+ import { Cartes, Entity as Entity$1, ENVIRONMENT, Api, Calculator, ClientFile, EntityTag, EntityType, LRUCache, ObjectUtils, Style, Carto, Geometry, EntityLod, MenuItem, ProjectView, ProjectViewBookmark, Tileset, ZoomControl, Bounds, Color as Color$1, DataLab, DelayQueue, BruceEvent, EntityRelation, BruceApi, EntityHistoricData, ProgramKey, EntitySource, EntityCoords, Camera, ProjectViewTile, ProjectViewLegacyTile, EntityAttachment, EntityAttachmentType, EntityAttribute, MathUtils, Session, AccountConcept, RecordChangeFeed, EntityRelationType } from 'bruce-models';
4
4
 
5
5
  /**
6
6
  * Ensures a number is returned from a given value.
@@ -6084,6 +6084,11 @@ function getValue$1(viewer, obj) {
6084
6084
  }
6085
6085
  return obj;
6086
6086
  }
6087
+ /*
6088
+ * Cache identity for a terrain provider we cannot name, which is anything without our own metadata on it and not
6089
+ * Cesium's own flat ellipsoid. Deliberately not FlatTerrain, see shouldCullEntity.
6090
+ */
6091
+ const UNRECOGNISED_TERRAIN_ID = "unrecognised-terrain";
6087
6092
  const boundingSphereCache = new LRUCache(100000);
6088
6093
  function getPositionsFromEntity(viewer, entity) {
6089
6094
  let positions = [];
@@ -6201,7 +6206,7 @@ function shouldCullEntity(viewer, cEntity) {
6201
6206
  let boundingSphere;
6202
6207
  const terrainId = (_c = (_b = (_a = ViewUtils.GatherTerrainTile({
6203
6208
  viewer
6204
- })) === null || _a === void 0 ? void 0 : _a.terrain) === null || _b === void 0 ? void 0 : _b.tilesetId) !== null && _c !== void 0 ? _c : ProjectViewTile.EDefaultTerrain.FlatTerrain;
6209
+ })) === null || _a === void 0 ? void 0 : _a.terrain) === null || _b === void 0 ? void 0 : _b.tilesetId) !== null && _c !== void 0 ? _c : UNRECOGNISED_TERRAIN_ID;
6205
6210
  const cacheKey = terrainId + cEntity.id;
6206
6211
  const cacheData = boundingSphereCache.Get(cacheKey);
6207
6212
  if (cacheData) {
@@ -40311,7 +40316,7 @@ var StyleUtils;
40311
40316
  StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
40312
40317
  })(StyleUtils || (StyleUtils = {}));
40313
40318
 
40314
- const VERSION = "7.0.3";
40319
+ const VERSION = "7.0.4";
40315
40320
  /**
40316
40321
  * Updates the environment instance used by bruce-cesium to one specified.
40317
40322
  * This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.