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.
@@ -18624,11 +18624,20 @@
18624
18624
  TilesetRenderEngine.ApplyPosition = ApplyPosition;
18625
18625
  // Eye dome lighting strength that keeps depth readable as soft grey edges, tuned on a coloured scan in November 2026.
18626
18626
  TilesetRenderEngine.POINT_OUTLINE_STRENGTH = 0.02;
18627
+ /*
18628
+ * Returns a positive maximum point size, since a stored 0 or null shrinks every point to nothing.
18629
+ */
18630
+ function GetMaximumAttenuation(value, fallback) {
18631
+ const size = value == null ? NaN : Number(value);
18632
+ return size > 0 ? size : fallback;
18633
+ }
18634
+ TilesetRenderEngine.GetMaximumAttenuation = GetMaximumAttenuation;
18627
18635
  function ApplySettings(params) {
18628
18636
  const { cTileset, settings } = params;
18629
18637
  cTileset.maximumScreenSpaceError = EnsureNumber(settings.maxScreenSpaceError, 5);
18630
18638
  cTileset.pointCloudShading.attenuation = Boolean(settings.attenuation);
18631
- cTileset.pointCloudShading.maximumAttenuation = EnsureNumber(settings.maximumAttenuation, 4);
18639
+ const maximumAttenuation = GetMaximumAttenuation(settings.maximumAttenuation, 4);
18640
+ cTileset.pointCloudShading.maximumAttenuation = maximumAttenuation;
18632
18641
  // Cesium's eye dome lighting is the point outline, at its default strength of 1 they render black.
18633
18642
  cTileset.pointCloudShading.eyeDomeLighting = settings.pointOutlines !== false;
18634
18643
  cTileset.pointCloudShading.eyeDomeLightingStrength = TilesetRenderEngine.POINT_OUTLINE_STRENGTH;
@@ -18639,7 +18648,8 @@
18639
18648
  }
18640
18649
  const cTilesetExt = cTileset;
18641
18650
  cTilesetExt._bruceSettings = {
18642
- ...settings
18651
+ ...settings,
18652
+ maximumAttenuation
18643
18653
  };
18644
18654
  }
18645
18655
  TilesetRenderEngine.ApplySettings = ApplySettings;
@@ -29456,10 +29466,7 @@
29456
29466
  if (!attenuation && attenuation != false) {
29457
29467
  attenuation = true;
29458
29468
  }
29459
- let attenuationMax = this.item.attenuationMax;
29460
- if (isNaN(attenuationMax)) {
29461
- attenuationMax = 20;
29462
- }
29469
+ const attenuationMax = exports.TilesetRenderEngine.GetMaximumAttenuation(this.item.attenuationMax, 20);
29463
29470
  exports.TilesetRenderEngine.OnTilesetReady(this.cTileset).then(() => {
29464
29471
  exports.TilesetRenderEngine.ApplySettings({
29465
29472
  cTileset: this.cTileset,
@@ -29829,10 +29836,7 @@
29829
29836
  if (!attenuation && attenuation != false) {
29830
29837
  attenuation = true;
29831
29838
  }
29832
- let attenuationMax = this.item.attenuationMax;
29833
- if (isNaN(attenuationMax)) {
29834
- attenuationMax = 20;
29835
- }
29839
+ const attenuationMax = exports.TilesetRenderEngine.GetMaximumAttenuation(this.item.attenuationMax, 20);
29836
29840
  exports.TilesetRenderEngine.ApplySettings({
29837
29841
  cTileset: this.cTileset,
29838
29842
  settings: {
@@ -61101,7 +61105,7 @@ void main() {
61101
61105
  StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
61102
61106
  })(exports.StyleUtils || (exports.StyleUtils = {}));
61103
61107
 
61104
- const VERSION = "7.8.9";
61108
+ const VERSION = "7.9.0";
61105
61109
  /**
61106
61110
  * Updates the environment instance used by bruce-cesium to one specified.
61107
61111
  * This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.