@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.js
CHANGED
|
@@ -18928,13 +18928,13 @@ class App {
|
|
|
18928
18928
|
const mc = this.controls.modelCenter;
|
|
18929
18929
|
const mr = this.controls.modelRadius;
|
|
18930
18930
|
if (mr !== Infinity) {
|
|
18931
|
-
const groundY =
|
|
18932
|
-
const
|
|
18931
|
+
const groundY = 0;
|
|
18932
|
+
const h = cam[1] - groundY;
|
|
18933
18933
|
const dx = cam[0] - mc[0];
|
|
18934
18934
|
const dz = cam[2] - mc[2];
|
|
18935
18935
|
const hDist = Math.sqrt(dx * dx + dz * dz);
|
|
18936
|
-
const raw = Math.atan2(
|
|
18937
|
-
pitchOffset = Math.max(-1
|
|
18936
|
+
const raw = -Math.atan2(h, Math.max(hDist, 0.01));
|
|
18937
|
+
pitchOffset = Math.max(-1, Math.min(1, raw));
|
|
18938
18938
|
}
|
|
18939
18939
|
}
|
|
18940
18940
|
this.skyboxRenderer.prepareFrame(
|