@d5techs/3dgs-lib 1.4.62 → 1.4.63

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.
package/dist/3dgs-lib.cjs CHANGED
@@ -19083,30 +19083,26 @@ class App {
19083
19083
  const cam = this.camera.position;
19084
19084
  let groundLevel = 0;
19085
19085
  const gsRendererForGround = this.sceneManager.getGSRenderer();
19086
- if (gsRendererForGround) {
19087
- const bbox = gsRendererForGround.getBoundingBox();
19088
- if (bbox) {
19089
- const m = gsRendererForGround.getModelMatrix();
19090
- groundLevel = m[5] * bbox.min[1] + m[13];
19091
- if (!this._hdrDebugLogged) {
19092
- this._hdrDebugLogged = true;
19093
- console.log(
19094
- "[HDR Ground Debug]",
19095
- "bbox.min:",
19096
- bbox.min,
19097
- "bbox.max:",
19098
- bbox.max,
19099
- "bbox.center:",
19100
- bbox.center,
19101
- "groundLevel:",
19102
- groundLevel,
19103
- "cam:",
19104
- [cam[0].toFixed(2), cam[1].toFixed(2), cam[2].toFixed(2)],
19105
- "camH_effective:",
19106
- (cam[1] - groundLevel).toFixed(2)
19107
- );
19108
- }
19109
- }
19086
+ const bbox = (gsRendererForGround == null ? void 0 : gsRendererForGround.getBoundingBox()) ?? null;
19087
+ if (bbox) {
19088
+ const m = gsRendererForGround.getModelMatrix();
19089
+ groundLevel = m[5] * bbox.min[1] + m[13];
19090
+ }
19091
+ if (!this._hdrDebugLogged) {
19092
+ this._hdrDebugLogged = true;
19093
+ console.log(
19094
+ "[HDR Ground Debug]",
19095
+ "hasGsRenderer:",
19096
+ !!gsRendererForGround,
19097
+ "hasBbox:",
19098
+ !!bbox,
19099
+ "bbox:",
19100
+ bbox ? { min: [...bbox.min], max: [...bbox.max], center: [...bbox.center] } : null,
19101
+ "groundLevel:",
19102
+ groundLevel,
19103
+ "cam:",
19104
+ [cam[0].toFixed(2), cam[1].toFixed(2), cam[2].toFixed(2)]
19105
+ );
19110
19106
  }
19111
19107
  this.skyboxRenderer.prepareFrame(
19112
19108
  this.camera.viewMatrix,