bruce-cesium 7.8.8 → 7.8.9

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, Cartesian2, Cartesian4, sampleTerrain, Texture, PixelFormat, Sampler, TextureWrap, TextureMinificationFilter, TextureMagnificationFilter, PixelDatatype, VertexArray, BufferUsage, ShaderProgram, RenderState, BlendingState, DrawCommand, Pass, JulianDate, Quaternion, HeadingPitchRoll, HeightReference, ConstantPositionProperty, DistanceDisplayCondition, ColorBlendMode, Model, ClassificationType, HorizontalOrigin, VerticalOrigin, ImageMaterialProperty, PolygonHierarchy, PolylineGraphics, ArcType, CornerType, Rectangle, SceneMode, IntersectionTests, Ray, SceneTransforms, FeatureDetection, Matrix3, NearFarScalar, KmlDataSource, GeoJsonDataSource, Cesium3DTileStyle, HeadingPitchRange, Cesium3DTileColorBlendMode, Ion, IonResource, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, Cesium3DTileset, OrthographicFrustum, EasingFunction, Intersect, ShadowMode, CustomDataSource, WebGLConstants, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, GeometryInstance, PrimitiveCollection, PolylineCollection, LabelCollection, LabelStyle, Material, Event, CameraEventType, Plane, OrientedBoundingBox, ScreenSpaceEventHandler, ScreenSpaceEventType, Fullscreen, PolygonPipeline, CesiumInspector, ClockRange, DynamicEnvironmentMapManager, 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, Api, Bounds, ClientFileValueMap, Color as Color$1, Geometry as Geometry$1, ProjectView, ProjectViewBookmark, ZoomControl, Assembly, EntityCoords, BruceApi, EntityRelation, EntitySource, ProgramKey, ProjectViewLegacyTile, Camera, Account, AccountLimits, Session, EntityAttachment, EntityAttribute, MathUtils, ProjectViewBookmarkGroup } from 'bruce-models';
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';
4
4
 
5
5
  /**
6
6
  * Ensures a number is returned from a given value.
@@ -9683,7 +9683,7 @@ var EntityLabel;
9683
9683
  const places = clickEntityIds.filter(id => { var _a, _b; return (_b = (_a = this.visualRegister.GetLabelGroupFor(id)) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.placeId; });
9684
9684
  if (places.length) {
9685
9685
  const keys = event;
9686
- this.visualRegister.ClickLabelPlaces(places, Boolean(keys.ctrlKey || keys.metaKey || keys.shiftKey));
9686
+ this.visualRegister.ClickLabelPlaces(places, Boolean(keys.ctrlKey || keys.metaKey || keys.shiftKey), clickEntityIds.length > 1);
9687
9687
  }
9688
9688
  const entityIds = clickEntityIds.filter(id => !places.includes(id));
9689
9689
  if (!entityIds.length) {
@@ -11260,7 +11260,8 @@ var EntityLabelGroup;
11260
11260
  latitude: place.latitude,
11261
11261
  altitude: place.altitude,
11262
11262
  look: place.look,
11263
- selected: place.selected || undefined
11263
+ selected: place.selected || undefined,
11264
+ interactive: place.interactive || undefined
11264
11265
  }));
11265
11266
  }
11266
11267
  EntityLabelGroup.FromPlaces = FromPlaces;
@@ -11813,7 +11814,7 @@ var EntityLabelGroup;
11813
11814
  }
11814
11815
  if (item.placeId) {
11815
11816
  // Clickable only when the app asks, and reported then, as there is no Entity to select.
11816
- options.selectOnClick = this.placesInteractive;
11817
+ options.selectOnClick = this.placesInteractive || Boolean(item.interactive);
11817
11818
  options.highlightColor = item.selected ? PLACE_SELECTED_COLOR : undefined;
11818
11819
  const look = item.look;
11819
11820
  if ((look === null || look === void 0 ? void 0 : look.iconUrl) || (look === null || look === void 0 ? void 0 : look.iconClass)) {
@@ -16830,13 +16831,13 @@ var VisualsRegister;
16830
16831
  this.labelGroups.SetPlacesInteractive(on);
16831
16832
  }
16832
16833
  /*
16833
- * Called by a label clicked while places are interactive, with the place keys it stands for.
16834
+ * Called by a clicked label that stands for places, with their keys and whether it was a cluster.
16834
16835
  */
16835
- ClickLabelPlaces(keys, additive) {
16836
+ ClickLabelPlaces(keys, additive, cluster = keys.length > 1) {
16836
16837
  const places = keys.map(key => { var _a, _b, _c; return ({ groupId: (_a = this.GetLabelGroupFor(key)) === null || _a === void 0 ? void 0 : _a.groupId, placeId: (_c = (_b = this.GetLabelGroupFor(key)) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.placeId }); })
16837
16838
  .filter(place => place.groupId && place.placeId);
16838
16839
  if (places.length) {
16839
- this.labelPlaceClicked.Trigger({ places, additive });
16840
+ this.labelPlaceClicked.Trigger({ places, additive, cluster });
16840
16841
  }
16841
16842
  }
16842
16843
  /*
@@ -18655,11 +18656,16 @@ var TilesetRenderEngine;
18655
18656
  cTilesetExt._bruceModelSpace = Boolean(params.modelSpace);
18656
18657
  }
18657
18658
  TilesetRenderEngine.ApplyPosition = ApplyPosition;
18659
+ // Eye dome lighting strength that keeps depth readable as soft grey edges, tuned on a coloured scan in November 2026.
18660
+ TilesetRenderEngine.POINT_OUTLINE_STRENGTH = 0.02;
18658
18661
  function ApplySettings(params) {
18659
18662
  const { cTileset, settings } = params;
18660
18663
  cTileset.maximumScreenSpaceError = EnsureNumber(settings.maxScreenSpaceError, 5);
18661
18664
  cTileset.pointCloudShading.attenuation = Boolean(settings.attenuation);
18662
18665
  cTileset.pointCloudShading.maximumAttenuation = EnsureNumber(settings.maximumAttenuation, 4);
18666
+ // Cesium's eye dome lighting is the point outline, at its default strength of 1 they render black.
18667
+ cTileset.pointCloudShading.eyeDomeLighting = settings.pointOutlines !== false;
18668
+ cTileset.pointCloudShading.eyeDomeLightingStrength = TilesetRenderEngine.POINT_OUTLINE_STRENGTH;
18663
18669
  if (settings.colorMask) {
18664
18670
  cTileset.style = new Cesium3DTileStyle({
18665
18671
  color: settings.colorMask
@@ -18789,6 +18795,7 @@ var TilesetRenderEngine;
18789
18795
  settings: {
18790
18796
  attenuation: settings.attenuation,
18791
18797
  maximumAttenuation: settings.attenuationMax,
18798
+ pointOutlines: settings.pointOutlines,
18792
18799
  maxScreenSpaceError: settings.maximumScreenSpaceError
18793
18800
  }
18794
18801
  });
@@ -18905,6 +18912,7 @@ var TilesetRenderEngine;
18905
18912
  attenuation: visual.attenuation != false,
18906
18913
  colorMask: visual.colorMask,
18907
18914
  maximumAttenuation: visual.attenuationMax,
18915
+ pointOutlines: visual.pointOutlines,
18908
18916
  maxScreenSpaceError: visual.maximumScreenSpaceError
18909
18917
  }
18910
18918
  });
@@ -29527,7 +29535,8 @@ var TilesetEntitiesRenderManager;
29527
29535
  cTileset: this.cTileset,
29528
29536
  settings: {
29529
29537
  attenuation: attenuation,
29530
- maximumAttenuation: attenuationMax
29538
+ maximumAttenuation: attenuationMax,
29539
+ pointOutlines: this.item.pointOutlines
29531
29540
  }
29532
29541
  });
29533
29542
  });
@@ -29898,7 +29907,8 @@ var TilesetEntitiesRenderManager;
29898
29907
  cTileset: this.cTileset,
29899
29908
  settings: {
29900
29909
  attenuation: attenuation,
29901
- maximumAttenuation: attenuationMax
29910
+ maximumAttenuation: attenuationMax,
29911
+ pointOutlines: this.item.pointOutlines
29902
29912
  }
29903
29913
  });
29904
29914
  this.viewer.scene.requestRender();
@@ -36123,7 +36133,8 @@ var MenuItemManager;
36123
36133
  Type: item.Type,
36124
36134
  BruceEntity: { SelectedExpandLayers: (_a = eItem.BruceEntity) === null || _a === void 0 ? void 0 : _a.SelectedExpandLayers },
36125
36135
  attenuation: tItem.attenuation,
36126
- attenuationMax: tItem.attenuationMax
36136
+ attenuationMax: tItem.attenuationMax,
36137
+ pointOutlines: tItem.pointOutlines
36127
36138
  }));
36128
36139
  this.authoredAlternations.set(item, authored);
36129
36140
  }
@@ -39591,10 +39602,11 @@ var MenuItemCreator;
39591
39602
  const tItem = item;
39592
39603
  const authored = manager.GetAuthoredAlternation(item);
39593
39604
  const tItemAlt = alternations[item.id];
39594
- const hasAttenuation = (tItemAlt === null || tItemAlt === void 0 ? void 0 : tItemAlt.attenuation) !== undefined || (tItemAlt === null || tItemAlt === void 0 ? void 0 : tItemAlt.attenuationMax) !== undefined;
39605
+ const hasAttenuation = (tItemAlt === null || tItemAlt === void 0 ? void 0 : tItemAlt.attenuation) !== undefined || (tItemAlt === null || tItemAlt === void 0 ? void 0 : tItemAlt.attenuationMax) !== undefined || (tItemAlt === null || tItemAlt === void 0 ? void 0 : tItemAlt.pointOutlines) !== undefined;
39595
39606
  const source = hasAttenuation ? tItemAlt : authored;
39596
39607
  tItem.attenuation = source.attenuation;
39597
39608
  tItem.attenuationMax = source.attenuationMax;
39609
+ tItem.pointOutlines = source.pointOutlines;
39598
39610
  }
39599
39611
  (_d = item.Children) === null || _d === void 0 ? void 0 : _d.forEach(alternateItems);
39600
39612
  };
@@ -61259,7 +61271,7 @@ var StyleUtils;
61259
61271
  StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
61260
61272
  })(StyleUtils || (StyleUtils = {}));
61261
61273
 
61262
- const VERSION = "7.8.8";
61274
+ const VERSION = "7.8.9";
61263
61275
  /**
61264
61276
  * Updates the environment instance used by bruce-cesium to one specified.
61265
61277
  * This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.