bruce-cesium 7.8.4 → 7.8.5

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.
@@ -30101,7 +30101,7 @@
30101
30101
  * Loads a scan with optional SDK tuning and per-viewer budget control.
30102
30102
  */
30103
30103
  function Render(params) {
30104
- var _a, _b, _c, _d;
30104
+ var _a, _b, _c;
30105
30105
  const { api, viewer, tileset } = params;
30106
30106
  if (typeof LCCRender === "undefined" || typeof (LCCRender === null || LCCRender === void 0 ? void 0 : LCCRender.load) !== "function") {
30107
30107
  console.warn("[XGridsRenderEngine] Render() LCCRender library not available.");
@@ -30232,8 +30232,7 @@
30232
30232
  return null;
30233
30233
  }
30234
30234
  try {
30235
- const sdkBudget = typeof obj.getCurrentConfig === "function" ? (_d = obj.getCurrentConfig()) === null || _d === void 0 ? void 0 : _d.maxLoadSplatCount : undefined;
30236
- maxSplats = GetSplatBudget(sdkBudget, profile);
30235
+ maxSplats = GetSplatBudget(profile);
30237
30236
  if (LCCRender.nextspaceMetadataReady === 1 &&
30238
30237
  typeof obj.setNextspaceMetadataCallback === "function" &&
30239
30238
  typeof obj.setMaxSplats === "function") {
@@ -30275,16 +30274,16 @@
30275
30274
  }
30276
30275
  XGridsRenderEngine.Render = Render;
30277
30276
  /*
30278
- * The most splats a scan may load: the tier's, lowered by the SDK's GPU limit unless overridden.
30277
+ * The most splats a scan may load: the tier's, capped by what the SDK's splat texture can hold.
30279
30278
  */
30280
- function GetSplatBudget(sdkBudget, profile) {
30279
+ function GetSplatBudget(profile) {
30280
+ var _a;
30281
30281
  const budget = exports.DeviceProfile.GetBudget(profile.tier).splats;
30282
- // Above 2M the SDK is reporting its flat default, not a limit it chose for this GPU.
30283
- if (!profile.overridden &&
30284
- Number.isFinite(sdkBudget) &&
30285
- sdkBudget > 0 &&
30286
- sdkBudget <= 2000000) {
30287
- return Math.min(sdkBudget, budget);
30282
+ // The SDK's GPU guess misreads many GPU names and skips Firefox; only its texture cap is real.
30283
+ const size = (_a = profile.environment) === null || _a === void 0 ? void 0 : _a.maxTextureSize;
30284
+ if (Number.isFinite(size) &&
30285
+ size > 0) {
30286
+ return Math.min(budget, size * size / 4);
30288
30287
  }
30289
30288
  return budget;
30290
30289
  }
@@ -60860,7 +60859,7 @@ void main() {
60860
60859
  StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
60861
60860
  })(exports.StyleUtils || (exports.StyleUtils = {}));
60862
60861
 
60863
- const VERSION = "7.8.4";
60862
+ const VERSION = "7.8.5";
60864
60863
  /**
60865
60864
  * Updates the environment instance used by bruce-cesium to one specified.
60866
60865
  * This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.