Repository navigation
fix(examples): keep the terrain example's camera above ground across changes - #731
Merged
Merged
Conversation
…changes Follow-ups from the last review of #720: - Reset the exaggeration to the default on a scene change. Every start view is set for it, and at 3x NAIP's start put the camera inside the terrain in short windows. - Leave the camera where it is when the exaggeration goes down. Lowered with the terrain, it ended up nearer the ground, and the new TerrainController's first pick could zoom past maxZoom and jump back. - Size the camera math from the window: the controller's view states keep a stale size after a resize until you next move the map. - Correct the start view's thresholds (630 px, and 1760x1100 at the default exaggeration), the pitch limit's framing and the naip.ts comment. - Document that TerrainController's first pick after an exaggeration change can miss the visible ground. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR was written by Claude (Claude Code), not by @kylebarron.
Follow-ups to #720's terrain example, from a final review of its camera changes:
TerrainController's first pick could zoom pastmaxZoomand jump back. Raising it still raises the camera with the terrain.naip.tscomment on cancelled tiles no longer depends on fix(deck.gl-raster): destroy tile textures when a raster layer is removed #728.Not fixed: the first pick after an exaggeration change
The review found that the new
TerrainController's first pick can land on the wrong ground, and suggested a newTerrainLayerper exaggeration. I tried that, and also waiting for the terrain to load before handing the camera to aTerrainController. Neither changed the result.The README now describes it: the target eases to the ground as you move, so zooming straight in after raising the exaggeration can take the camera into the slope.
Checked in headed Chrome at 1200x750:
🤖 Written by Claude Code