mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-14 23:32:20 +00:00
fix(camera): keep a wheel zoom at the screen centre from stopping the globe
Above 1,000 km Cesium's wheel zoom turns the globe from the point under the screen centre towards the point under the pointer. With the pointer on the centre pixel the two are the same point; the dot product of its unit normal with itself often rounds to just under 1, so Cesium rotates about their cross product, which is the zero vector. Camera.rotate throws "normalized result is not a number" from Scene.initializeFrame and the render loop stops until the page is reloaded. Guard camera.rotate against an axis it cannot normalize, and restart the render loop from the last drawn pose when any error stops it, up to three times in ten seconds. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
1 parent
188f0ccd9b
commit
f1869ff52c
4 files changed
+386
No files matched your search
@@ -207,6 +207,7 @@
|
||||
"modules": [
|
||||
"src/app/viewer.js",
|
||||
"src/app/atmosphereCompat.js",
|
||||
"src/app/renderRecovery.js",
|
||||
"src/globeInView.js",
|
||||
"src/sky/starrySky.js",
|
||||
"src/sky/stars.js",
|
||||
@@ -2610,6 +2611,7 @@
|
||||
"src/sky/starrySky.js",
|
||||
"src/sky/stars.js",
|
||||
"src/app/atmosphereCompat.js",
|
||||
"src/app/renderRecovery.js",
|
||||
"src/bloom.js",
|
||||
"src/camera.js",
|
||||
"src/cameraGroundGuard.js",
|
||||
|
||||
Reference in new issue
Block a user