Skip to content

Commit

Permalink
feat(globe): limit zoom to 2000km above ground
Browse files Browse the repository at this point in the history
  • Loading branch information
mrMetalWood committed Sep 3, 2020
1 parent 57b1f1f commit ceb3140
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/scripts/components/main/globe/globe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ const Globe: FunctionComponent<Props> = ({
// @ts-ignore
scopedViewer.scene.globe.showGroundAtmosphere = false;
}

// Distance is set in meters -> 2000km above ground.
// min/max is opposite of how we usually use it.
scopedViewer.scene.screenSpaceCameraController.minimumZoomDistance = 2000000;

// save viewer reference
setViewer(scopedViewer);

Expand Down

0 comments on commit ceb3140

Please sign in to comment.