bruce-cesium 6.0.5 → 6.0.6

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, 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, OrthographicFrustum, EasingFunction, NearFarScalar, 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';
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, HeadingPitchRange, Ion, Cesium3DTileColorBlendMode, KmlDataSource, Quaternion, Matrix3, Matrix4, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, Cesium3DTileset, IonResource, EllipsoidTerrainProvider, CesiumInspector, defined, ClockRange, PolygonPipeline, EllipsoidGeodesic, sampleTerrainMostDetailed, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, BoundingSphere, GeometryInstance, ScreenSpaceEventHandler, ScreenSpaceEventType, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
4
4
 
5
5
  const TIME_LAG = 300;
6
6
  const POSITION_CHECK_TIMER = 950;
@@ -2989,6 +2989,7 @@ const CESIUM_TIMELINE_KEY = "_nextspace_timeline";
2989
2989
  const CESIUM_TIMELINE_LIVE_KEY = "_nextspace_timeline_live";
2990
2990
  const CESIUM_TIMELINE_LIVE_PADDING_KEY = "_nextspace_timeline_live_padding";
2991
2991
  const CESIUM_TIMELINE_INTERVAL_KEY = "_nextspace_timeline_interval";
2992
+ const CESIUM_MODEL_SPACE_KEY = "_nextspace_model_space";
2992
2993
  const DEFAULT_LIVE_PADDING_SECONDS = 30 * 60;
2993
2994
  var ViewUtils;
2994
2995
  (function (ViewUtils) {
@@ -3351,7 +3352,7 @@ var ViewUtils;
3351
3352
  }
3352
3353
  // When globe is off, we'll also hide the stars/moon.
3353
3354
  // We also grab the globe color and apply it to the sky.
3354
- if (hidden) {
3355
+ if (hidden && GetModelSpace(viewer)) {
3355
3356
  scene.skyBox.show = false;
3356
3357
  scene.skyAtmosphere.show = false;
3357
3358
  scene.sun.show = false;
@@ -3368,6 +3369,25 @@ var ViewUtils;
3368
3369
  scene.globe.baseColor = baseColor;
3369
3370
  }
3370
3371
  ViewUtils.SetGlobeDetails = SetGlobeDetails;
3372
+ function SetModelSpace(viewer, modelSpace) {
3373
+ if (!viewer) {
3374
+ return;
3375
+ }
3376
+ if (viewer[CESIUM_MODEL_SPACE_KEY] === modelSpace) {
3377
+ return;
3378
+ }
3379
+ viewer[CESIUM_MODEL_SPACE_KEY] = modelSpace;
3380
+ // Reload globe since we display it differently between the two modes.
3381
+ SetGlobeDetails({ viewer });
3382
+ }
3383
+ ViewUtils.SetModelSpace = SetModelSpace;
3384
+ function GetModelSpace(viewer) {
3385
+ if (!viewer) {
3386
+ return false;
3387
+ }
3388
+ return Boolean(viewer[CESIUM_MODEL_SPACE_KEY]);
3389
+ }
3390
+ ViewUtils.GetModelSpace = GetModelSpace;
3371
3391
  })(ViewUtils || (ViewUtils = {}));
3372
3392
 
3373
3393
  function traverseEntity(cEntity, arr, ignoreParent, onlyEditable, onlySelectable) {
@@ -3550,7 +3570,7 @@ var EntityUtils;
3550
3570
  let validSamples = 0;
3551
3571
  // When in model-space, Assembly Entities are all relative to 0,0 lat/lon.
3552
3572
  // Which means we have to ignore the location and calculate based on relative position to 0,0.
3553
- const modelSpace = viewer["nextspace-model-space"] === true;
3573
+ const modelSpace = ViewUtils.GetModelSpace(viewer);
3554
3574
  // Quick lookup on what historic Entities we have and what dates they map to.
3555
3575
  let latestDate = null;
3556
3576
  const entityIdDates = new Map();
@@ -4228,7 +4248,7 @@ var EntityUtils;
4228
4248
  if (allowRendered == null) {
4229
4249
  allowRendered = true;
4230
4250
  }
4231
- const isModelSpace = viewer["nextspace-model-space"] === true;
4251
+ const isModelSpace = ViewUtils.GetModelSpace(viewer);
4232
4252
  const isAssemblyEntity = ((_a = entity === null || entity === void 0 ? void 0 : entity.Bruce) === null || _a === void 0 ? void 0 : _a.AssemblyRootLocation) != null;
4233
4253
  function evaluateRendered() {
4234
4254
  const rego = visualRegister ? visualRegister.GetRego({
@@ -26744,9 +26764,6 @@ const ITERATION_KEY$1 = "nextspace-view-render-engine-iteration";
26744
26764
  // 1- new accounts get our token set.
26745
26765
  // 2- we reference to the template account's token.
26746
26766
  const CESIUM_DEFAULT_TOKEN = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJiODI1OWQyZC0wYzdlLTRlOTctODFlOC1kYjIwOGYzOWE0NGIiLCJpZCI6MTE3NDg0LCJpYXQiOjE2NzAzODczOTR9.sx0EZdD-Y33FQ7gB_R3CkTsk3KhNpODoQGrnpvSH4UQ";
26747
- // Model-space flag so we know if we're changing from and to model-space.
26748
- // This helps determine if we should instantly transition.
26749
- const MODEL_SPACE_FLAG = "nextspace-model-space";
26750
26767
  /**
26751
26768
  * Creates a new iteration state.
26752
26769
  * This will stop any existing renders from processing to their end.
@@ -27099,7 +27116,7 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
27099
27116
  });
27100
27117
  }
27101
27118
  }
27102
- viewer[MODEL_SPACE_FLAG] = contentType == ProjectViewBookmark.EContentType.WEB_3D_MODEL_SPACE;
27119
+ ViewUtils.SetModelSpace(viewer, contentType == ProjectViewBookmark.EContentType.WEB_3D_MODEL_SPACE);
27103
27120
  let terrain = (bSettings === null || bSettings === void 0 ? void 0 : bSettings.terrain) != null ? bSettings === null || bSettings === void 0 ? void 0 : bSettings.terrain : (_o = defaults.settings) === null || _o === void 0 ? void 0 : _o.terrain;
27104
27121
  if (terrain) {
27105
27122
  // If there is no Cesium token set then we'll swap cesium terrain to flat terrain.
@@ -33500,7 +33517,7 @@ class WidgetViewBar extends Widget.AWidget {
33500
33517
  }
33501
33518
  }
33502
33519
 
33503
- const VERSION = "6.0.5";
33520
+ const VERSION = "6.0.6";
33504
33521
 
33505
- 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, 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 };
33522
+ 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, 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 };
33506
33523
  //# sourceMappingURL=bruce-cesium.es5.js.map