Skip to content

Commit

Permalink
Adjust documentation typing and wording
Browse files Browse the repository at this point in the history
  • Loading branch information
ggetz committed Oct 9, 2024
1 parent 4ce83e9 commit c52823b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Apps/Sandcastle/gallery/Bathymetry.html
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions packages/engine/Source/Scene/ScreenSpaceCameraController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <code>undefined</code>, 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;

Expand Down

0 comments on commit c52823b

Please sign in to comment.