From 166833338e6f3f3c6db412a32c11cf7d9f26dbef Mon Sep 17 00:00:00 2001 From: fukunee Date: Sat, 19 Sep 2026 16:27:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=20tilt=2050=C2=B0=20?= =?UTF-8?q?=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scene/CesiumGlobe.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/scene/CesiumGlobe.js b/src/scene/CesiumGlobe.js index 728c444..a7fd28e 100644 --- a/src/scene/CesiumGlobe.js +++ b/src/scene/CesiumGlobe.js @@ -213,23 +213,6 @@ export class CesiumGlobe { controller.minimumZoomDistance = 3000; // 最近约 3 km(城区尺度) controller.maximumZoomDistance = 8e6; // 最远约 8000 km - // 限制最大倾斜角:pitch 夹取到 -40°(即从天底最多 50°)。用 postUpdate 手动夹取, - // 避免原生 maximumTiltAngle 在极限处与拖动反复角力产生的抖动。 - const MAX_TILT_PITCH = Cesium.Math.toRadians(-40); - scene.postUpdate.addEventListener(() => { - const camera = viewer.camera; - if (camera.pitch > MAX_TILT_PITCH) { - camera.setView({ - destination: Cesium.Cartesian3.clone(camera.positionWC), - orientation: { - heading: camera.heading, - pitch: MAX_TILT_PITCH, - roll: camera.roll, - }, - }); - } - }); - // 限制鼠标按钮:只保留左键旋转 + 滚轮缩放;禁用中键倾斜、右键缩放 controller.rotateEventTypes = Cesium.CameraEventType.LEFT_DRAG; controller.zoomEventTypes = [