@d5techs/3dgs-lib 1.4.46 → 1.4.47
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 +4 -4
- package/dist/3dgs-lib.cjs.map +1 -1
- package/dist/3dgs-lib.js +4 -4
- package/dist/3dgs-lib.js.map +1 -1
- package/package.json +1 -1
package/dist/3dgs-lib.cjs
CHANGED
|
@@ -18930,13 +18930,13 @@ class App {
|
|
|
18930
18930
|
const mc = this.controls.modelCenter;
|
|
18931
18931
|
const mr = this.controls.modelRadius;
|
|
18932
18932
|
if (mr !== Infinity) {
|
|
18933
|
-
const groundY =
|
|
18934
|
-
const
|
|
18933
|
+
const groundY = 0;
|
|
18934
|
+
const h = cam[1] - groundY;
|
|
18935
18935
|
const dx = cam[0] - mc[0];
|
|
18936
18936
|
const dz = cam[2] - mc[2];
|
|
18937
18937
|
const hDist = Math.sqrt(dx * dx + dz * dz);
|
|
18938
|
-
const raw = Math.atan2(
|
|
18939
|
-
pitchOffset = Math.max(-1
|
|
18938
|
+
const raw = -Math.atan2(h, Math.max(hDist, 0.01));
|
|
18939
|
+
pitchOffset = Math.max(-1, Math.min(1, raw));
|
|
18940
18940
|
}
|
|
18941
18941
|
}
|
|
18942
18942
|
this.skyboxRenderer.prepareFrame(
|