mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 01:02:23 +00:00
fix(cockpit): the orbital view gives the field of view back on exit
Cesium's fov was saved and put back when the orbital view closed, so a later resize or rotation kept Cesium's own behaviour. The exit held the saved vertical angle through setFov instead, which the camera port kept for the rest of the session: rotated to portrait, the view stayed zoomed in. setFov(null) gives the field of view back: Cesium's fov as it was before the first hold, the stub's own angle.
This commit is contained in:
1 parent
03a7d8827a
commit
4a781f0480
6 files changed
+52
-12
No files matched your search
Vendored
+6
-1
@@ -240,7 +240,12 @@ export interface CameraPort {
|
||||
* sent many times over.
|
||||
*/
|
||||
setView(view: ViewSpec): void;
|
||||
setFov(fov: { vertical: number }): void;
|
||||
/**
|
||||
* Hold the vertical field of view, across resizes, until `null` gives the
|
||||
* field of view back to the renderer: it is then as it was before the
|
||||
* first hold, and follows the view's shape as the renderer's own does.
|
||||
*/
|
||||
setFov(fov: { vertical: number } | null): void;
|
||||
/**
|
||||
* The geodetic rectangle in view: the bounds of the canvas corners on the
|
||||
* ellipsoid, a corner that misses it taken where the horizon is, and the
|
||||
|
||||
Reference in new issue
Block a user