bruce-cesium 7.1.7 → 7.1.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 * as Cesium from 'cesium';
2
- import { Cartographic, ColorMaterialProperty, Entity, Color, ConstantProperty, CallbackProperty, Primitive, Cesium3DTileFeature, ShaderSource, Cartesian3, Math as Math$1, Ellipsoid, Transforms, Matrix4, Geometry, GeometryAttribute, ComponentDatatype, PrimitiveType, BoundingSphere, GeometryPipeline, sampleTerrain, Texture, PixelFormat, Sampler, TextureWrap, TextureMinificationFilter, TextureMagnificationFilter, VertexArray, BufferUsage, ShaderProgram, RenderState, BlendingState, DrawCommand, Pass, Cartesian2, DistanceDisplayCondition, HeightReference, ColorBlendMode, HeadingPitchRoll, ShadowMode, ClassificationType, Model, HorizontalOrigin, VerticalOrigin, ConstantPositionProperty, JulianDate, Quaternion, ArcType, CornerType, ImageMaterialProperty, PolygonHierarchy, PolylineGraphics, Rectangle, SceneTransforms, NearFarScalar, Matrix3, KmlDataSource, GeoJsonDataSource, SceneMode, Cesium3DTileStyle, HeadingPitchRange, Ion, IonResource, Cesium3DTileColorBlendMode, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, Cesium3DTileset, OrthographicFrustum, EasingFunction, Intersect, CustomDataSource, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, PolygonPipeline, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, CesiumInspector, ClockRange, GeometryInstance, ScreenSpaceEventHandler, ScreenSpaceEventType, Fullscreen, CzmlDataSource } from 'cesium';
3
- import { Cartes, Entity as Entity$1, ProjectViewTile, ENVIRONMENT, Calculator, ClientFile, EntityLod, EntityTag, EntityType, LRUCache, ObjectUtils, Style, Api, Carto, Geometry as Geometry$1, MenuItem, ProjectView, ProjectViewBookmark, Tileset, ZoomControl, Bounds, Color as Color$1, BruceEvent, EntityCoords, DataLab, DelayQueue, EntityHistoricData, AccountConcept, RecordChangeFeed, BruceApi, EntityRelation, ProgramKey, EntitySource, ProjectViewLegacyTile, Camera, Account, AccountLimits, Session, UrlUtils, EntityAttachment, EntityAttachmentType, EntityAttribute, MathUtils, ProjectViewBookmarkGroup, EntityRelationType } from 'bruce-models';
2
+ import { Cartographic, ColorMaterialProperty, Entity, Color, ConstantProperty, CallbackProperty, Primitive, Cesium3DTileFeature, ShaderSource, Cartesian3, Math as Math$1, Ellipsoid, Transforms, Matrix4, Geometry, GeometryAttribute, ComponentDatatype, PrimitiveType, BoundingSphere, GeometryPipeline, sampleTerrain, Texture, PixelFormat, Sampler, TextureWrap, TextureMinificationFilter, TextureMagnificationFilter, VertexArray, BufferUsage, ShaderProgram, RenderState, BlendingState, DrawCommand, Pass, Cartesian2, JulianDate, Quaternion, HeadingPitchRoll, DistanceDisplayCondition, ClassificationType, ArcType, HeightReference, CornerType, ShadowMode, ConstantPositionProperty, HorizontalOrigin, VerticalOrigin, ColorBlendMode, Model, SceneTransforms, NearFarScalar, Matrix3, Rectangle, ImageMaterialProperty, PolygonHierarchy, PolylineGraphics, KmlDataSource, SceneMode, Cesium3DTileStyle, HeadingPitchRange, Ion, IonResource, GeoJsonDataSource, Cesium3DTileColorBlendMode, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, Cesium3DTileset, OrthographicFrustum, EasingFunction, Intersect, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, PolygonPipeline, CesiumInspector, ClockRange, CustomDataSource, ScreenSpaceEventHandler, ScreenSpaceEventType, GeometryInstance, Fullscreen, CzmlDataSource } from 'cesium';
3
+ import { Cartes, Entity as Entity$1, ProjectViewTile, ENVIRONMENT, Calculator, Carto, EntityTag, EntityType, Geometry as Geometry$1, ObjectUtils, Style, Api, ClientFile, LRUCache, EntityLod, MenuItem, ProjectView, ProjectViewBookmark, Tileset, ZoomControl, BruceEvent, EntityCoords, Bounds, Color as Color$1, DelayQueue, EntityHistoricData, DataLab, BruceApi, EntityRelation, EntitySource, AccountConcept, RecordChangeFeed, ProgramKey, ProjectViewLegacyTile, Camera, Account, AccountLimits, Session, UrlUtils, ProjectViewBookmarkGroup, EntityAttachment, EntityAttachmentType, EntityAttribute, MathUtils, EntityRelationType } from 'bruce-models';
4
4
 
5
5
  /**
6
6
  * Ensures a number is returned from a given value.
@@ -2976,6 +2976,7 @@ const CESIUM_TIMELINE_INTERVAL_KEY = "_nextspace_timeline_interval";
2976
2976
  const CESIUM_MODEL_SPACE_KEY = "_nextspace_model_space";
2977
2977
  const DEFAULT_LIVE_PADDING_SECONDS = 30 * 60;
2978
2978
  const DEFAULT_BRIGHTNESS_SHIFT = 0.2;
2979
+ const DEFAULT_LIGHT_INTENSITY = 3;
2979
2980
  var ViewUtils;
2980
2981
  (function (ViewUtils) {
2981
2982
  function GatherLegacyMapTiles(params) {
@@ -3327,23 +3328,32 @@ var ViewUtils;
3327
3328
  */
3328
3329
  function ApplyDefaultBrightness(viewer, shift = DEFAULT_BRIGHTNESS_SHIFT) {
3329
3330
  const scene = viewer === null || viewer === void 0 ? void 0 : viewer.scene;
3330
- if (!scene || !(shift > 0)) {
3331
+ if (!scene) {
3331
3332
  return;
3332
3333
  }
3333
3334
  // Atmosphere settings moved from Globe onto Scene, and the sky keeps its own copy, so each is
3334
3335
  // probed rather than version checked: host apps bring their own CesiumJS.
3335
3336
  const SCENE = scene;
3336
- if (SCENE.atmosphere && typeof SCENE.atmosphere.brightnessShift === "number") {
3337
- SCENE.atmosphere.brightnessShift = shift;
3338
- }
3339
- if (SCENE.globe && typeof SCENE.globe.atmosphereBrightnessShift === "number") {
3340
- SCENE.globe.atmosphereBrightnessShift = shift;
3341
- }
3342
- if (SCENE.skyAtmosphere && typeof SCENE.skyAtmosphere.brightnessShift === "number") {
3343
- SCENE.skyAtmosphere.brightnessShift = shift;
3337
+ if (shift > 0) {
3338
+ if (SCENE.atmosphere && typeof SCENE.atmosphere.brightnessShift === "number") {
3339
+ SCENE.atmosphere.brightnessShift = shift;
3340
+ }
3341
+ if (SCENE.globe && typeof SCENE.globe.atmosphereBrightnessShift === "number") {
3342
+ SCENE.globe.atmosphereBrightnessShift = shift;
3343
+ }
3344
+ if (SCENE.skyAtmosphere && typeof SCENE.skyAtmosphere.brightnessShift === "number") {
3345
+ SCENE.skyAtmosphere.brightnessShift = shift;
3346
+ }
3344
3347
  }
3345
3348
  }
3346
3349
  ViewUtils.ApplyDefaultBrightness = ApplyDefaultBrightness;
3350
+ /**
3351
+ * Options handed to every tileset and model this library creates.
3352
+ */
3353
+ function DefaultEnvironmentMapOptions() {
3354
+ return { enabled: false };
3355
+ }
3356
+ ViewUtils.DefaultEnvironmentMapOptions = DefaultEnvironmentMapOptions;
3347
3357
  function SetGlobeDetails(params) {
3348
3358
  let { viewer, hidden, baseColor } = params;
3349
3359
  const scene = viewer === null || viewer === void 0 ? void 0 : viewer.scene;
@@ -14702,6 +14712,7 @@ async function createTileset(url, props, noMemoryLimit) {
14702
14712
  const defaultProps = {
14703
14713
  // "Optimization option. Reduce the screen space error for tiles that are further away from the camera.".
14704
14714
  dynamicScreenSpaceError: true,
14715
+ environmentMapOptions: ViewUtils.DefaultEnvironmentMapOptions()
14705
14716
  };
14706
14717
  if (noMemoryLimit != true) {
14707
14718
  // "The maximum amount of memory in MB that can be used by the tileset.".
@@ -21438,7 +21449,8 @@ var TilesetGooglePhotosRenderManager;
21438
21449
  return;
21439
21450
  }
21440
21451
  this.cTileset = await CESIUM.Cesium3DTileset.fromUrl(proxyRootUrl, {
21441
- showCreditsOnScreen: true
21452
+ showCreditsOnScreen: true,
21453
+ environmentMapOptions: ViewUtils.DefaultEnvironmentMapOptions()
21442
21454
  });
21443
21455
  }
21444
21456
  else {
@@ -22982,6 +22994,7 @@ var AssemblyRenderManager;
22982
22994
  const cEntity = this.viewer.entities.add({
22983
22995
  model: {
22984
22996
  uri: lod["ClientFile"].URL,
22997
+ environmentMapOptions: ViewUtils.DefaultEnvironmentMapOptions(),
22985
22998
  heightReference: HeightReference.NONE
22986
22999
  },
22987
23000
  // point: {
@@ -29059,7 +29072,7 @@ async function renderNavigator(iteration, params, bookmark, view, getters) {
29059
29072
  if (lighting == null) {
29060
29073
  lighting = {
29061
29074
  color: Color.WHITE.toCssColorString(),
29062
- intensity: 2
29075
+ intensity: DEFAULT_LIGHT_INTENSITY
29063
29076
  };
29064
29077
  }
29065
29078
  const light = viewer.scene.light;
@@ -38734,6 +38747,7 @@ var EntityRenderEngineModel3d;
38734
38747
  id: ObjectUtils.UId(15),
38735
38748
  model: {
38736
38749
  uri: params.lodUrl,
38750
+ environmentMapOptions: ViewUtils.DefaultEnvironmentMapOptions(),
38737
38751
  heightReference: heightRef,
38738
38752
  scale: new CallbackProperty(() => scale * styleScale, true),
38739
38753
  shadows: ShadowMode.ENABLED,
@@ -39375,7 +39389,8 @@ async function getModelEntity(url, scale) {
39375
39389
  return await CESIUM.Model.fromGltfAsync({
39376
39390
  url: url,
39377
39391
  asynchronous: true,
39378
- scale: scale
39392
+ scale: scale,
39393
+ environmentMapOptions: ViewUtils.DefaultEnvironmentMapOptions()
39379
39394
  });
39380
39395
  }
39381
39396
  // Older versions of Cesium have a fromGltf method.
@@ -43537,7 +43552,7 @@ var StyleUtils;
43537
43552
  StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
43538
43553
  })(StyleUtils || (StyleUtils = {}));
43539
43554
 
43540
- const VERSION = "7.1.7";
43555
+ const VERSION = "7.1.8";
43541
43556
  /**
43542
43557
  * Updates the environment instance used by bruce-cesium to one specified.
43543
43558
  * This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.
@@ -43554,5 +43569,5 @@ const getENVIRONMENT = () => {
43554
43569
  return ENVIRONMENT;
43555
43570
  };
43556
43571
 
43557
- export { VERSION, setENVIRONMENT, getENVIRONMENT, CesiumAnimatedInOut, DisplacedSurfacePrimitive, CesiumAnimatedProperty, isStyleChanged, isOutlineChanged$1 as isOutlineChanged, StyleEffective, EntityRenderEngine, EntityRenderEngineModel3d, EntityRenderEnginePoint, EntityRenderEnginePolygon, EntityRenderEnginePolyline, MenuItemCreator, MenuItemManager, CesiumParabola, EntityLabel, LiveCursor, SharedGetters, DataSourceStaticKmlManager, DataLabRenderManager, EntitiesIdsRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, AssemblyRenderManager, GoogleSearchRenderManager, RelationsRenderManager, RenderManager, TilesetArbRenderManager, TilesetCadRenderManager, TilesetEntitiesRenderManager, TilesetGooglePhotosRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TileRenderEngine, createTileset, TilesetRenderEngine, ViewRenderEngine, VisualRegisterCuller, VisualsRegister, XGridsRenderEngine, CesiumEntityStyler, DrawingUtils, EntityUtils, MeasureUtils, StyleUtils, 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, DEFAULT_BRIGHTNESS_SHIFT, ViewUtils, CesiumViewMonitor, ViewGroundArea, ViewerEventTracker, ViewerUtils, Draw3dPolygon, Draw3dPolyline, MeasureCreator, Walkthrough, WidgetControlViewBar, WidgetControlViewBarSearch, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks, WidgetLeftPanelTabDashboard, EMenuItemState, WidgetLeftPanelTabMenuItems, Widget, VIEWER_BOOKMARKS_WIDGET_KEY, WidgetBookmarks, WidgetBranding, WidgetCursorBar, WidgetEmbeddedInfoView, WidgetInfoView, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, WidgetLeftPanel, WidgetNavCompass$$1 as WidgetNavCompass, VIEWER_VIEW_BAR_WIDGET_KEY, WidgetViewBar };
43572
+ export { VERSION, setENVIRONMENT, getENVIRONMENT, CesiumAnimatedInOut, DisplacedSurfacePrimitive, CesiumAnimatedProperty, isStyleChanged, isOutlineChanged$1 as isOutlineChanged, StyleEffective, EntityRenderEngine, EntityRenderEngineModel3d, EntityRenderEnginePoint, EntityRenderEnginePolygon, EntityRenderEnginePolyline, MenuItemCreator, MenuItemManager, CesiumParabola, EntityLabel, LiveCursor, SharedGetters, DataSourceStaticKmlManager, DataLabRenderManager, EntitiesIdsRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, AssemblyRenderManager, GoogleSearchRenderManager, RelationsRenderManager, RenderManager, TilesetArbRenderManager, TilesetCadRenderManager, TilesetEntitiesRenderManager, TilesetGooglePhotosRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TileRenderEngine, createTileset, TilesetRenderEngine, ViewRenderEngine, VisualRegisterCuller, VisualsRegister, XGridsRenderEngine, CesiumEntityStyler, DrawingUtils, EntityUtils, MeasureUtils, StyleUtils, 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, DEFAULT_BRIGHTNESS_SHIFT, DEFAULT_LIGHT_INTENSITY, ViewUtils, CesiumViewMonitor, ViewGroundArea, ViewerEventTracker, ViewerUtils, Draw3dPolygon, Draw3dPolyline, MeasureCreator, Walkthrough, WidgetControlViewBar, WidgetControlViewBarSearch, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks, WidgetLeftPanelTabDashboard, EMenuItemState, WidgetLeftPanelTabMenuItems, Widget, VIEWER_BOOKMARKS_WIDGET_KEY, WidgetBookmarks, WidgetBranding, WidgetCursorBar, WidgetEmbeddedInfoView, WidgetInfoView, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, WidgetLeftPanel, WidgetNavCompass$$1 as WidgetNavCompass, VIEWER_VIEW_BAR_WIDGET_KEY, WidgetViewBar };
43558
43573
  //# sourceMappingURL=bruce-cesium.es5.js.map