bruce-cesium 5.1.2 → 5.1.3

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, HorizontalOrigin, VerticalOrigin, ConstantProperty, ClassificationType, ConstantPositionProperty, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, Cesium3DTileStyle, Ion, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, EllipsoidTerrainProvider, CesiumInspector, defined, ClockRange, Cesium3DTileset, Matrix4, Matrix3, IonResource, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, 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, HorizontalOrigin, VerticalOrigin, ConstantProperty, ClassificationType, ConstantPositionProperty, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, Cesium3DTileStyle, Ion, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, Cesium3DTileset, Matrix4, Matrix3, IonResource, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, Quaternion, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
4
4
 
5
5
  const TIME_LAG = 300;
6
6
  const POSITION_CHECK_TIMER = 950;
@@ -22831,12 +22831,42 @@ var TileRenderEngine;
22831
22831
  if (!params.apiGetter) {
22832
22832
  params.apiGetter = ENVIRONMENT.Api().GetBruceGetter();
22833
22833
  }
22834
- // Clean duplicate items.
22834
+ // Clean duplicate items and set default values.
22835
22835
  let tmpTiles = [];
22836
22836
  for (let i = 0; i < params.tiles.length; i++) {
22837
22837
  const tile = params.tiles[i];
22838
22838
  if (!tmpTiles.find(x => (x.accountId == tile.accountId) && (x.tilesetId == tile.tilesetId))) {
22839
22839
  tmpTiles.push(tile);
22840
+ // Set default values.
22841
+ if (tile.alpha == null) {
22842
+ tile.alpha = 1;
22843
+ }
22844
+ if (tile.contrast == null) {
22845
+ tile.contrast = 1;
22846
+ }
22847
+ if (tile.gamma == null) {
22848
+ tile.gamma = 1;
22849
+ }
22850
+ if (tile.hue == null) {
22851
+ tile.hue = 0;
22852
+ }
22853
+ if (tile.saturation == null) {
22854
+ tile.saturation = 1;
22855
+ }
22856
+ if (tile.brightness == null) {
22857
+ // Gotten complaints about the scene being too dark even during day.
22858
+ // So we'll adjust the brightness for our common and tested options.
22859
+ // Other ones can be manually adjusted by the user in the side-panel.
22860
+ const BRIGHTEN_MAP = {
22861
+ [ProjectViewTile.EDefaultImagery.BingMapsAerial]: 1.2,
22862
+ [ProjectViewTile.EDefaultImagery.BingMapsAerialWithLabels]: 1.2,
22863
+ [ProjectViewTile.EDefaultImagery.MapboxSatellite]: 1.05
22864
+ };
22865
+ tile.brightness = BRIGHTEN_MAP[tile.tilesetId];
22866
+ if (tile.brightness == null) {
22867
+ tile.brightness = 1;
22868
+ }
22869
+ }
22840
22870
  }
22841
22871
  }
22842
22872
  params.tiles = tmpTiles;
@@ -22855,11 +22885,11 @@ var TileRenderEngine;
22855
22885
  if (layer) {
22856
22886
  params.viewer.imageryLayers.raiseToTop(layer);
22857
22887
  layer.alpha = EnsureNumber(enabled.alpha == null ? 1 : enabled.alpha);
22858
- layer.brightness = EnsureNumber(enabled.brightness == null ? 1 : enabled.brightness);
22859
22888
  layer.contrast = EnsureNumber(enabled.contrast == null ? 1 : enabled.contrast);
22860
22889
  layer.hue = EnsureNumber(enabled.hue == null ? 0 : enabled.hue);
22861
22890
  layer.saturation = EnsureNumber(enabled.saturation == null ? 1 : enabled.saturation);
22862
22891
  layer.gamma = EnsureNumber(enabled.gamma == null ? 1 : enabled.gamma);
22892
+ layer.brightness = EnsureNumber(enabled.brightness == null ? 1 : enabled.brightness);
22863
22893
  }
22864
22894
  }
22865
22895
  params.viewer.scene.requestRender();
@@ -29779,7 +29809,7 @@ class WidgetViewBar extends Widget.AWidget {
29779
29809
  }
29780
29810
  }
29781
29811
 
29782
- const VERSION = "5.1.2";
29812
+ const VERSION = "5.1.3";
29783
29813
 
29784
29814
  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, 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 };
29785
29815
  //# sourceMappingURL=bruce-cesium.es5.js.map