bruce-cesium 7.8.9 → 7.9.0

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, ConstantPositionProperty, HeightReference, DistanceDisplayCondition, ColorBlendMode, HeadingPitchRoll, Math as Math$1, Transforms, Cartesian3, Model, ClassificationType, Matrix4, ShaderSource, Ellipsoid, Geometry, GeometryAttribute, ComponentDatatype, PrimitiveType, BoundingSphere, GeometryPipeline, Cartesian2, Cartesian4, sampleTerrain, Texture, PixelFormat, Sampler, TextureWrap, TextureMinificationFilter, TextureMagnificationFilter, PixelDatatype, VertexArray, BufferUsage, ShaderProgram, RenderState, BlendingState, DrawCommand, Pass, ArcType, CornerType, JulianDate, Quaternion, HorizontalOrigin, VerticalOrigin, ImageMaterialProperty, PolygonHierarchy, PolylineGraphics, Rectangle, SceneMode, IntersectionTests, Ray, SceneTransforms, NearFarScalar, Matrix3, KmlDataSource, GeoJsonDataSource, Cesium3DTileStyle, HeadingPitchRange, FeatureDetection, Ion, IonResource, Cesium3DTileColorBlendMode, Cesium3DTileset, Intersect, OrthographicFrustum, EasingFunction, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, WebGLConstants, PolygonPipeline, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, CesiumInspector, ClockRange, ShadowMode, DynamicEnvironmentMapManager, GeometryInstance, PrimitiveCollection, PolylineCollection, LabelCollection, LabelStyle, Material, CustomDataSource, Event, CameraEventType, Plane, OrientedBoundingBox, ScreenSpaceEventHandler, ScreenSpaceEventType, Fullscreen, CzmlDataSource } from 'cesium';
3
- import { Cartes, LRUCache, Carto, ProjectViewTile, EntityHistoricData, BruceEvent, DelayQueue, Entity as Entity$1, EntityTag, PathUtils, ClientFile, ENVIRONMENT, EntityAttachmentType, EntityRelationType, EntityType, Tileset, Calculator, DataLab, Style, ObjectUtils, MenuItem, AccountConcept, RecordChangeFeed, EntityLod, UrlUtils, Geometry as Geometry$1, Api, Bounds, ClientFileValueMap, Color as Color$1, ProjectView, ProjectViewBookmark, ZoomControl, Assembly, EntityCoords, EntityRelation, BruceApi, EntitySource, Camera, ProgramKey, ProjectViewLegacyTile, Account, AccountLimits, Session, ProjectViewBookmarkGroup, EntityAttachment, EntityAttribute, MathUtils } from 'bruce-models';
2
+ import { Cartographic, ColorMaterialProperty, Entity, Color, ConstantProperty, CallbackProperty, Primitive, Cesium3DTileFeature, ConstantPositionProperty, HeightReference, DistanceDisplayCondition, HorizontalOrigin, VerticalOrigin, Cartesian3, ClassificationType, ShaderSource, Math as Math$1, Ellipsoid, Transforms, Matrix4, Geometry, GeometryAttribute, ComponentDatatype, PrimitiveType, BoundingSphere, GeometryPipeline, Cartesian2, Cartesian4, sampleTerrain, Texture, PixelFormat, Sampler, TextureWrap, TextureMinificationFilter, TextureMagnificationFilter, PixelDatatype, VertexArray, BufferUsage, ShaderProgram, RenderState, BlendingState, DrawCommand, Pass, ArcType, CornerType, JulianDate, Quaternion, HeadingPitchRoll, ColorBlendMode, Model, SceneMode, IntersectionTests, Ray, SceneTransforms, ImageMaterialProperty, PolygonHierarchy, PolylineGraphics, Rectangle, NearFarScalar, Matrix3, KmlDataSource, GeoJsonDataSource, Cesium3DTileStyle, HeadingPitchRange, Ion, IonResource, FeatureDetection, Cesium3DTileColorBlendMode, Cesium3DTileset, Intersect, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, WebGLConstants, OrthographicFrustum, EasingFunction, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, PolygonPipeline, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, CesiumInspector, ClockRange, ShadowMode, DynamicEnvironmentMapManager, GeometryInstance, CustomDataSource, Event, PrimitiveCollection, PolylineCollection, LabelCollection, LabelStyle, Material, ScreenSpaceEventHandler, ScreenSpaceEventType, CameraEventType, Plane, OrientedBoundingBox, Fullscreen, CzmlDataSource } from 'cesium';
3
+ import { Cartes, LRUCache, Carto, ProjectViewTile, EntityHistoricData, BruceEvent, DelayQueue, Entity as Entity$1, EntityTag, PathUtils, ClientFile, ENVIRONMENT, EntityAttachmentType, EntityRelationType, EntityType, Tileset, Calculator, DataLab, Style, ObjectUtils, MenuItem, AccountConcept, RecordChangeFeed, Api, Geometry as Geometry$1, EntityLod, UrlUtils, ProjectView, ProjectViewBookmark, ZoomControl, Assembly, EntityCoords, Bounds, ClientFileValueMap, Color as Color$1, EntityRelation, BruceApi, EntitySource, ProgramKey, ProjectViewLegacyTile, Camera, Account, AccountLimits, Session, EntityAttachment, EntityAttribute, MathUtils, ProjectViewBookmarkGroup } from 'bruce-models';
4
4
 
5
5
  /**
6
6
  * Ensures a number is returned from a given value.
@@ -18658,11 +18658,20 @@ var TilesetRenderEngine;
18658
18658
  TilesetRenderEngine.ApplyPosition = ApplyPosition;
18659
18659
  // Eye dome lighting strength that keeps depth readable as soft grey edges, tuned on a coloured scan in November 2026.
18660
18660
  TilesetRenderEngine.POINT_OUTLINE_STRENGTH = 0.02;
18661
+ /*
18662
+ * Returns a positive maximum point size, since a stored 0 or null shrinks every point to nothing.
18663
+ */
18664
+ function GetMaximumAttenuation(value, fallback) {
18665
+ const size = value == null ? NaN : Number(value);
18666
+ return size > 0 ? size : fallback;
18667
+ }
18668
+ TilesetRenderEngine.GetMaximumAttenuation = GetMaximumAttenuation;
18661
18669
  function ApplySettings(params) {
18662
18670
  const { cTileset, settings } = params;
18663
18671
  cTileset.maximumScreenSpaceError = EnsureNumber(settings.maxScreenSpaceError, 5);
18664
18672
  cTileset.pointCloudShading.attenuation = Boolean(settings.attenuation);
18665
- cTileset.pointCloudShading.maximumAttenuation = EnsureNumber(settings.maximumAttenuation, 4);
18673
+ const maximumAttenuation = GetMaximumAttenuation(settings.maximumAttenuation, 4);
18674
+ cTileset.pointCloudShading.maximumAttenuation = maximumAttenuation;
18666
18675
  // Cesium's eye dome lighting is the point outline, at its default strength of 1 they render black.
18667
18676
  cTileset.pointCloudShading.eyeDomeLighting = settings.pointOutlines !== false;
18668
18677
  cTileset.pointCloudShading.eyeDomeLightingStrength = TilesetRenderEngine.POINT_OUTLINE_STRENGTH;
@@ -18673,7 +18682,8 @@ var TilesetRenderEngine;
18673
18682
  }
18674
18683
  const cTilesetExt = cTileset;
18675
18684
  cTilesetExt._bruceSettings = {
18676
- ...settings
18685
+ ...settings,
18686
+ maximumAttenuation
18677
18687
  };
18678
18688
  }
18679
18689
  TilesetRenderEngine.ApplySettings = ApplySettings;
@@ -29526,10 +29536,7 @@ var TilesetEntitiesRenderManager;
29526
29536
  if (!attenuation && attenuation != false) {
29527
29537
  attenuation = true;
29528
29538
  }
29529
- let attenuationMax = this.item.attenuationMax;
29530
- if (isNaN(attenuationMax)) {
29531
- attenuationMax = 20;
29532
- }
29539
+ const attenuationMax = TilesetRenderEngine.GetMaximumAttenuation(this.item.attenuationMax, 20);
29533
29540
  TilesetRenderEngine.OnTilesetReady(this.cTileset).then(() => {
29534
29541
  TilesetRenderEngine.ApplySettings({
29535
29542
  cTileset: this.cTileset,
@@ -29899,10 +29906,7 @@ var TilesetEntitiesRenderManager;
29899
29906
  if (!attenuation && attenuation != false) {
29900
29907
  attenuation = true;
29901
29908
  }
29902
- let attenuationMax = this.item.attenuationMax;
29903
- if (isNaN(attenuationMax)) {
29904
- attenuationMax = 20;
29905
- }
29909
+ const attenuationMax = TilesetRenderEngine.GetMaximumAttenuation(this.item.attenuationMax, 20);
29906
29910
  TilesetRenderEngine.ApplySettings({
29907
29911
  cTileset: this.cTileset,
29908
29912
  settings: {
@@ -61271,7 +61275,7 @@ var StyleUtils;
61271
61275
  StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
61272
61276
  })(StyleUtils || (StyleUtils = {}));
61273
61277
 
61274
- const VERSION = "7.8.9";
61278
+ const VERSION = "7.9.0";
61275
61279
  /**
61276
61280
  * Updates the environment instance used by bruce-cesium to one specified.
61277
61281
  * This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.