bruce-cesium 7.7.3 → 7.7.4

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.
@@ -28173,14 +28173,12 @@
28173
28173
  var _a, _b;
28174
28174
  // Array index is the LOD level, ie: index 0 = LOD 0.
28175
28175
  const lods = obj.getLodInfos();
28176
- //console.log("xgrids-getLodInfos()", lods);
28177
- const HARD_MIN = 1000000;
28178
- const HARD_MAX = 20000000;
28179
- const maxSplats = Math.max(lods ? lods[0] || 0 : 0, HARD_MIN);
28180
- obj.setMaxSplats(Math.min(HARD_MAX, maxSplats));
28181
- if (maxSplats >= HARD_MAX) {
28182
- console.warn("Reduced splat quality due to the number of splats being too large. Was: \"" + maxSplats + "\", now is: \"" + HARD_MAX + "\".");
28183
- }
28176
+ const maxSplats = 6000000;
28177
+ // LCC 0.5.4 fixes the LOD when the budget exceeds LOD 1, leaving distant splats sparse.
28178
+ const lodBudget = (lods === null || lods === void 0 ? void 0 : lods[0]) > maxSplats && (lods === null || lods === void 0 ? void 0 : lods[1]) > 0
28179
+ ? Math.min(maxSplats, lods[1])
28180
+ : maxSplats;
28181
+ obj.setMaxSplats(lodBudget);
28184
28182
  // Auto fly to.
28185
28183
  if (params.flyTo) {
28186
28184
  const pos3d = (_b = (_a = obj === null || obj === void 0 ? void 0 : obj.getBounds) === null || _a === void 0 ? void 0 : _a.call(obj)) === null || _b === void 0 ? void 0 : _b.origin;
@@ -28201,6 +28199,15 @@
28201
28199
  }
28202
28200
  }
28203
28201
  });
28202
+ if (typeof (obj === null || obj === void 0 ? void 0 : obj.setRenderState) === "function") {
28203
+ // Splats must respect nearer meshes already drawn in the same Cesium pass.
28204
+ obj.setRenderState({
28205
+ depthTest: {
28206
+ enabled: true,
28207
+ func: Cesium.WebGLConstants.LEQUAL
28208
+ }
28209
+ });
28210
+ }
28204
28211
  if (typeof (obj === null || obj === void 0 ? void 0 : obj.setVisible) === "function") {
28205
28212
  obj.setVisible(true);
28206
28213
  }
@@ -57115,7 +57122,7 @@ void main() {
57115
57122
  StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
57116
57123
  })(exports.StyleUtils || (exports.StyleUtils = {}));
57117
57124
 
57118
- const VERSION = "7.7.3";
57125
+ const VERSION = "7.7.4";
57119
57126
  /**
57120
57127
  * Updates the environment instance used by bruce-cesium to one specified.
57121
57128
  * This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.