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.
@@ -9664,7 +9664,7 @@
9664
9664
  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; });
9665
9665
  if (places.length) {
9666
9666
  const keys = event;
9667
- this.visualRegister.ClickLabelPlaces(places, Boolean(keys.ctrlKey || keys.metaKey || keys.shiftKey));
9667
+ this.visualRegister.ClickLabelPlaces(places, Boolean(keys.ctrlKey || keys.metaKey || keys.shiftKey), clickEntityIds.length > 1);
9668
9668
  }
9669
9669
  const entityIds = clickEntityIds.filter(id => !places.includes(id));
9670
9670
  if (!entityIds.length) {
@@ -11240,7 +11240,8 @@
11240
11240
  latitude: place.latitude,
11241
11241
  altitude: place.altitude,
11242
11242
  look: place.look,
11243
- selected: place.selected || undefined
11243
+ selected: place.selected || undefined,
11244
+ interactive: place.interactive || undefined
11244
11245
  }));
11245
11246
  }
11246
11247
  EntityLabelGroup.FromPlaces = FromPlaces;
@@ -11793,7 +11794,7 @@
11793
11794
  }
11794
11795
  if (item.placeId) {
11795
11796
  // Clickable only when the app asks, and reported then, as there is no Entity to select.
11796
- options.selectOnClick = this.placesInteractive;
11797
+ options.selectOnClick = this.placesInteractive || Boolean(item.interactive);
11797
11798
  options.highlightColor = item.selected ? PLACE_SELECTED_COLOR : undefined;
11798
11799
  const look = item.look;
11799
11800
  if ((look === null || look === void 0 ? void 0 : look.iconUrl) || (look === null || look === void 0 ? void 0 : look.iconClass)) {
@@ -16805,13 +16806,13 @@
16805
16806
  this.labelGroups.SetPlacesInteractive(on);
16806
16807
  }
16807
16808
  /*
16808
- * Called by a label clicked while places are interactive, with the place keys it stands for.
16809
+ * Called by a clicked label that stands for places, with their keys and whether it was a cluster.
16809
16810
  */
16810
- ClickLabelPlaces(keys, additive) {
16811
+ ClickLabelPlaces(keys, additive, cluster = keys.length > 1) {
16811
16812
  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 }); })
16812
16813
  .filter(place => place.groupId && place.placeId);
16813
16814
  if (places.length) {
16814
- this.labelPlaceClicked.Trigger({ places, additive });
16815
+ this.labelPlaceClicked.Trigger({ places, additive, cluster });
16815
16816
  }
16816
16817
  }
16817
16818
  /*
@@ -18621,11 +18622,16 @@
18621
18622
  cTilesetExt._bruceModelSpace = Boolean(params.modelSpace);
18622
18623
  }
18623
18624
  TilesetRenderEngine.ApplyPosition = ApplyPosition;
18625
+ // Eye dome lighting strength that keeps depth readable as soft grey edges, tuned on a coloured scan in November 2026.
18626
+ TilesetRenderEngine.POINT_OUTLINE_STRENGTH = 0.02;
18624
18627
  function ApplySettings(params) {
18625
18628
  const { cTileset, settings } = params;
18626
18629
  cTileset.maximumScreenSpaceError = EnsureNumber(settings.maxScreenSpaceError, 5);
18627
18630
  cTileset.pointCloudShading.attenuation = Boolean(settings.attenuation);
18628
18631
  cTileset.pointCloudShading.maximumAttenuation = EnsureNumber(settings.maximumAttenuation, 4);
18632
+ // Cesium's eye dome lighting is the point outline, at its default strength of 1 they render black.
18633
+ cTileset.pointCloudShading.eyeDomeLighting = settings.pointOutlines !== false;
18634
+ cTileset.pointCloudShading.eyeDomeLightingStrength = TilesetRenderEngine.POINT_OUTLINE_STRENGTH;
18629
18635
  if (settings.colorMask) {
18630
18636
  cTileset.style = new Cesium.Cesium3DTileStyle({
18631
18637
  color: settings.colorMask
@@ -18755,6 +18761,7 @@
18755
18761
  settings: {
18756
18762
  attenuation: settings.attenuation,
18757
18763
  maximumAttenuation: settings.attenuationMax,
18764
+ pointOutlines: settings.pointOutlines,
18758
18765
  maxScreenSpaceError: settings.maximumScreenSpaceError
18759
18766
  }
18760
18767
  });
@@ -18871,6 +18878,7 @@
18871
18878
  attenuation: visual.attenuation != false,
18872
18879
  colorMask: visual.colorMask,
18873
18880
  maximumAttenuation: visual.attenuationMax,
18881
+ pointOutlines: visual.pointOutlines,
18874
18882
  maxScreenSpaceError: visual.maximumScreenSpaceError
18875
18883
  }
18876
18884
  });
@@ -29457,7 +29465,8 @@
29457
29465
  cTileset: this.cTileset,
29458
29466
  settings: {
29459
29467
  attenuation: attenuation,
29460
- maximumAttenuation: attenuationMax
29468
+ maximumAttenuation: attenuationMax,
29469
+ pointOutlines: this.item.pointOutlines
29461
29470
  }
29462
29471
  });
29463
29472
  });
@@ -29828,7 +29837,8 @@
29828
29837
  cTileset: this.cTileset,
29829
29838
  settings: {
29830
29839
  attenuation: attenuation,
29831
- maximumAttenuation: attenuationMax
29840
+ maximumAttenuation: attenuationMax,
29841
+ pointOutlines: this.item.pointOutlines
29832
29842
  }
29833
29843
  });
29834
29844
  this.viewer.scene.requestRender();
@@ -36028,7 +36038,8 @@
36028
36038
  Type: item.Type,
36029
36039
  BruceEntity: { SelectedExpandLayers: (_a = eItem.BruceEntity) === null || _a === void 0 ? void 0 : _a.SelectedExpandLayers },
36030
36040
  attenuation: tItem.attenuation,
36031
- attenuationMax: tItem.attenuationMax
36041
+ attenuationMax: tItem.attenuationMax,
36042
+ pointOutlines: tItem.pointOutlines
36032
36043
  }));
36033
36044
  this.authoredAlternations.set(item, authored);
36034
36045
  }
@@ -39481,10 +39492,11 @@
39481
39492
  const tItem = item;
39482
39493
  const authored = manager.GetAuthoredAlternation(item);
39483
39494
  const tItemAlt = alternations[item.id];
39484
- const hasAttenuation = (tItemAlt === null || tItemAlt === void 0 ? void 0 : tItemAlt.attenuation) !== undefined || (tItemAlt === null || tItemAlt === void 0 ? void 0 : tItemAlt.attenuationMax) !== undefined;
39495
+ 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;
39485
39496
  const source = hasAttenuation ? tItemAlt : authored;
39486
39497
  tItem.attenuation = source.attenuation;
39487
39498
  tItem.attenuationMax = source.attenuationMax;
39499
+ tItem.pointOutlines = source.pointOutlines;
39488
39500
  }
39489
39501
  (_d = item.Children) === null || _d === void 0 ? void 0 : _d.forEach(alternateItems);
39490
39502
  };
@@ -61089,7 +61101,7 @@ void main() {
61089
61101
  StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
61090
61102
  })(exports.StyleUtils || (exports.StyleUtils = {}));
61091
61103
 
61092
- const VERSION = "7.8.8";
61104
+ const VERSION = "7.8.9";
61093
61105
  /**
61094
61106
  * Updates the environment instance used by bruce-cesium to one specified.
61095
61107
  * This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.