bruce-cesium 5.4.7 → 5.4.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, 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, 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, ClassificationType, ArcType, CornerType, ShadowMode, ConstantProperty, ConstantPositionProperty, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, HorizontalOrigin, VerticalOrigin, ColorBlendMode, HeadingPitchRoll, Transforms, Model, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, Cesium3DTileStyle, HeadingPitchRange, Ion, Cesium3DTileColorBlendMode, KmlDataSource, OrthographicFrustum, EasingFunction, NearFarScalar, SceneTransforms, Cesium3DTileset, Matrix4, Matrix3, IonResource, EllipsoidTerrainProvider, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, 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, ClassificationType, ArcType, CornerType, ShadowMode, ConstantProperty, ConstantPositionProperty, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, HorizontalOrigin, VerticalOrigin, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, Cesium3DTileStyle, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, KmlDataSource, OrthographicFrustum, EasingFunction, NearFarScalar, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, CesiumInspector, defined, ClockRange, Cesium3DTileset, Matrix4, Matrix3, IonResource, PolygonPipeline, SceneTransforms, EllipsoidGeodesic, sampleTerrainMostDetailed, BoundingSphere, GeometryInstance, Quaternion, 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;
@@ -5406,11 +5406,9 @@ async function getStyle(api, entity, styleId) {
5406
5406
  const CESIUM_INSPECTOR_KEY = "_nextspace_inspector";
5407
5407
  const CESIUM_TIMELINE_KEY = "_nextspace_timeline";
5408
5408
  const CESIUM_TIMELINE_LIVE_KEY = "_nextspace_timeline_live";
5409
- const CESIUM_TIMELINE_LIVE_PADDING_FORWARD_KEY = "_nextspace_timeline_live_padding_forward";
5410
- const CESIUM_TIMELINE_LIVE_PADDING_BACKWARD_KEY = "_nextspace_timeline_live_padding_backward";
5409
+ const CESIUM_TIMELINE_LIVE_PADDING_KEY = "_nextspace_timeline_live_padding";
5411
5410
  const CESIUM_TIMELINE_INTERVAL_KEY = "_nextspace_timeline_interval";
5412
- const DEFAULT_LIVE_PADDING_FORWARD_SECONDS = 5 * 60;
5413
- const DEFAULT_LIVE_PADDING_BACKWARD_SECONDS = 25 * 60;
5411
+ const DEFAULT_LIVE_PADDING_SECONDS = 30 * 60;
5414
5412
  var ViewUtils;
5415
5413
  (function (ViewUtils) {
5416
5414
  function GatherLegacyMapTiles(params) {
@@ -5635,8 +5633,7 @@ var ViewUtils;
5635
5633
  stopTimeIso: clock.stopTime.toString(),
5636
5634
  areCesiumValues: clock[CESIUM_TIMELINE_KEY] != true,
5637
5635
  isLive: clock[CESIUM_TIMELINE_LIVE_KEY] == true,
5638
- livePaddingForwardSeconds: clock[CESIUM_TIMELINE_LIVE_PADDING_FORWARD_KEY] || DEFAULT_LIVE_PADDING_FORWARD_SECONDS,
5639
- livePaddingBackwardSeconds: clock[CESIUM_TIMELINE_LIVE_PADDING_BACKWARD_KEY] || DEFAULT_LIVE_PADDING_BACKWARD_SECONDS
5636
+ livePaddingSeconds: clock[CESIUM_TIMELINE_LIVE_PADDING_KEY] || DEFAULT_LIVE_PADDING_SECONDS
5640
5637
  };
5641
5638
  }
5642
5639
  ViewUtils.GetTimeDetails = GetTimeDetails;
@@ -5647,7 +5644,7 @@ var ViewUtils;
5647
5644
  * @param params
5648
5645
  */
5649
5646
  function SetTimeDetails(params) {
5650
- let { viewer, animationSpeed, isAnimating, startTime, currentTime, stopTime, startTimeIso, stopTimeIso, currentTimeIso } = params;
5647
+ let { viewer, animationSpeed, isAnimating, startTime, currentTime, stopTime, startTimeIso, stopTimeIso, currentTimeIso, isLive, livePaddingSeconds } = params;
5651
5648
  const clock = viewer.clock;
5652
5649
  if (startTime) {
5653
5650
  clock.startTime = startTime;
@@ -5685,6 +5682,12 @@ var ViewUtils;
5685
5682
  if (isAnimating == null) {
5686
5683
  isAnimating = false;
5687
5684
  }
5685
+ if (isLive == null) {
5686
+ isLive = false;
5687
+ }
5688
+ if (livePaddingSeconds == null) {
5689
+ livePaddingSeconds = DEFAULT_LIVE_PADDING_SECONDS;
5690
+ }
5688
5691
  }
5689
5692
  if (!isNaN(animationSpeed) && animationSpeed != null) {
5690
5693
  clock.multiplier = animationSpeed;
@@ -5694,14 +5697,17 @@ var ViewUtils;
5694
5697
  }
5695
5698
  viewer.scene.requestRender();
5696
5699
  clock[CESIUM_TIMELINE_KEY] = true;
5697
- clock[CESIUM_TIMELINE_LIVE_KEY] = params.isLive == true;
5698
- clock[CESIUM_TIMELINE_LIVE_PADDING_FORWARD_KEY] = params.livePaddingSeconds || DEFAULT_LIVE_PADDING_FORWARD_SECONDS;
5699
- clock[CESIUM_TIMELINE_LIVE_PADDING_BACKWARD_KEY] = params.livePaddingSeconds || DEFAULT_LIVE_PADDING_BACKWARD_SECONDS;
5700
- if (params.isLive) {
5701
- startLive(viewer);
5700
+ if (livePaddingSeconds != null) {
5701
+ clock[CESIUM_TIMELINE_LIVE_PADDING_KEY] = livePaddingSeconds || DEFAULT_LIVE_PADDING_SECONDS;
5702
5702
  }
5703
- else {
5704
- stopLive(viewer);
5703
+ if (isLive != null) {
5704
+ clock[CESIUM_TIMELINE_LIVE_KEY] = params.isLive == true;
5705
+ if (isLive) {
5706
+ startLive(viewer);
5707
+ }
5708
+ else {
5709
+ stopLive(viewer);
5710
+ }
5705
5711
  }
5706
5712
  }
5707
5713
  ViewUtils.SetTimeDetails = SetTimeDetails;
@@ -5722,8 +5728,8 @@ var ViewUtils;
5722
5728
  clock.shouldAnimate = true;
5723
5729
  clock.multiplier = 1;
5724
5730
  clock.currentTime = JulianDate.now();
5725
- clock.startTime = JulianDate.addSeconds(clock.currentTime, -tDetails.livePaddingBackwardSeconds, new JulianDate());
5726
- clock.stopTime = JulianDate.addSeconds(clock.currentTime, tDetails.livePaddingForwardSeconds, new JulianDate());
5731
+ clock.startTime = JulianDate.addSeconds(clock.currentTime, -tDetails.livePaddingSeconds, new JulianDate());
5732
+ clock.stopTime = JulianDate.addSeconds(clock.currentTime, tDetails.livePaddingSeconds, new JulianDate());
5727
5733
  clock.clockRange = ClockRange.UNBOUNDED;
5728
5734
  }
5729
5735
  };
@@ -24942,7 +24948,8 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
24942
24948
  startTimeIso: timeline.start,
24943
24949
  stopTimeIso: timeline.end,
24944
24950
  isAnimating: timeline.playing,
24945
- isLive: timeline.live
24951
+ isLive: timeline.live,
24952
+ livePaddingSeconds: timeline.livePaddingMs ? Math.ceil(timeline.livePaddingMs / 1000) : null
24946
24953
  });
24947
24954
  // Newer version that has states per Entity ID + Menu Item ID.
24948
24955
  let states = bSettings === null || bSettings === void 0 ? void 0 : bSettings.states;
@@ -30758,7 +30765,7 @@ class WidgetViewBar extends Widget.AWidget {
30758
30765
  }
30759
30766
  }
30760
30767
 
30761
- const VERSION = "5.4.7";
30768
+ const VERSION = "5.4.8";
30762
30769
 
30763
- export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, isHistoricMetadataChanged, 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, CESIUM_TIMELINE_LIVE_KEY, CESIUM_TIMELINE_LIVE_PADDING_FORWARD_KEY, CESIUM_TIMELINE_LIVE_PADDING_BACKWARD_KEY, CESIUM_TIMELINE_INTERVAL_KEY, 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 };
30770
+ export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, isHistoricMetadataChanged, 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, CESIUM_TIMELINE_LIVE_KEY, CESIUM_TIMELINE_LIVE_PADDING_KEY, CESIUM_TIMELINE_INTERVAL_KEY, 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 };
30764
30771
  //# sourceMappingURL=bruce-cesium.es5.js.map