mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Give the Cesium camera port its user camera controls
camera.controls now maps the contract's CameraControls onto the scene's ScreenSpaceCameraController: the enable flags, zoom distances, zoom factor, coast as Cesium inertia (decay seconds, 0 for no coast), the collision switch, the tilt limit as the upper end of pitchRange, and the zoom bindings by name. suspend and enabled use the scene's shared input holds, so they count with the input port's and the dispatcher's. A follow's zoom hold now composes with the settings: minDistance and coast.zoom read and set what the follow gives back, a higher floor takes effect at once, and a follow never lengthens a shorter zoom coast. The ctrl+wheel binding check reuses the controls' binding helpers, and the controls checks run in the Cesium conformance set, the settings one in Node as well.
This commit is contained in:
1 parent
f0c5eaa868
commit
09a84ea8a5
13 files changed
+574
-36
No files matched your search
@@ -18,6 +18,7 @@ import {
|
||||
} from '../conformance/cameraScripts.js';
|
||||
import { runCameraScript } from '../conformance/cameraRunner.js';
|
||||
import { updateCameraChanged } from './internals.js';
|
||||
import { controllerDefaults } from './cameraControls.js';
|
||||
|
||||
/**
|
||||
* The contract's easings as Cesium's, kept here rather than taken from the
|
||||
@@ -66,8 +67,7 @@ export function headlessCamera() {
|
||||
globe: undefined,
|
||||
ellipsoid: Cesium.Ellipsoid.WGS84,
|
||||
screenSpaceCameraController: {
|
||||
minimumZoomDistance: 1,
|
||||
maximumZoomDistance: Number.POSITIVE_INFINITY,
|
||||
...controllerDefaults(),
|
||||
enableInputs: true,
|
||||
},
|
||||
frameState: { mode: Cesium.SceneMode.SCENE3D },
|
||||
|
||||
Reference in new issue
Block a user