From c52823befe3f7a8a52fffe3c4c1560ac18e50752 Mon Sep 17 00:00:00 2001 From: ggetz Date: Wed, 9 Oct 2024 13:49:19 -0400 Subject: [PATCH] Adjust documentation typing and wording --- Apps/Sandcastle/gallery/Bathymetry.html | 3 +++ .../engine/Source/Scene/ScreenSpaceCameraController.js | 9 +++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Apps/Sandcastle/gallery/Bathymetry.html b/Apps/Sandcastle/gallery/Bathymetry.html index 3a98117ed33..edca677a751 100644 --- a/Apps/Sandcastle/gallery/Bathymetry.html +++ b/Apps/Sandcastle/gallery/Bathymetry.html @@ -100,6 +100,9 @@ const scene = viewer.scene; + // Prevent the user from tilting beyond the ellipsoid surface + scene.screenSpaceCameraController.maximumTiltAngle = Math.PI / 2.0; + const globe = scene.globe; globe.enableLighting = true; globe.maximumScreenSpaceError = 1.0; // Load higher resolution tiles for better seafloor shading diff --git a/packages/engine/Source/Scene/ScreenSpaceCameraController.js b/packages/engine/Source/Scene/ScreenSpaceCameraController.js index db07c9b2fa7..869bb9ac1c9 100644 --- a/packages/engine/Source/Scene/ScreenSpaceCameraController.js +++ b/packages/engine/Source/Scene/ScreenSpaceCameraController.js @@ -272,12 +272,13 @@ function ScreenSpaceCameraController(scene) { */ this.enableCollisionDetection = true; /** - * If set, the camera will not be able to tilt past this angle, expressed in radians. - * @type {number} + * The angle, relative to the ellipsoid normal, restricting the maximum amount that the user can tilt the camera. If undefined, the angle of the camera tilt is unrestricted. + * @type {number|undefined} + * @default undefined * * @example - * // prevent camera from tilting below ellipsoid surface - * controller.maximumTiltAngle = Math.PI / 2 + * // Prevent the camera from tilting below the ellipsoid surface + * viewer.scene.screenSpaceCameraController.maximumTiltAngle = Math.PI / 2.0; */ this.maximumTiltAngle = undefined;