fix(website): adaptive FPV FOV + landscape fullscreen for the Parthenon example#32
Merged
Merged
Conversation
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.
Follow-up to #31 fixing two mobile issues on
/examples/parthenon.1. Portrait FPV FOV was too "close"
The FPV camera used a fixed CSS-perspective focal length (
perspective = 1000). Horizontal FOV ≈atan((width/2) / P), so on a ~414px-wide portrait phone that gave ~22° (telephoto/claustrophobic) vs ~56° on desktop.fpvPerspective()now scalesPwith the stage width (anchored so a desktop-width stage keeps the original value), holding a constant ~56° horizontal FOV across phone/tablet/desktop, and re-adapts on rotation/resize.2. Rotating to landscape cramped / covered the screen
The compact mobile layout (sidebar → tab bar, verbose header hidden) was gated only on
max-width: 50rem, which a landscape phone (896px wide) fails — so it fell back to the desktop layout, squishing the temple into a ~154px sliver behind the left rail + header.(max-height: 34rem)trigger to the compact-layout breakpoints (ExamplesSidebar.astro+ the page dock) so short/landscape viewports get the compact layout. Benefits every example page in landscape..header), the examples sidebar, and the page header are hidden so the matrix fills the whole screen (landscape stage height 154px → full viewport). Rotating back to portrait restores all chrome + navigation.Notes