Repository navigation
Fix model fit math - #158
Merged
Merged
Conversation
cabanier
force-pushed
the
fix-model-fit-math
branch
2 times, most recently
from
October 13, 2026 19:00
9f7fc43 to
a2e2248
Compare
Define metric model bounds and CSS-derived element-space meters, including resource-unit normalization, CSS pixel conversion, and zoom/DPR semantics. Correct initial and orbit fitting scale ratios, centering, and depth clearance. Fixes immersive-web#155.
Define automatic refitting after layout-size changes, preserving rotation and leaving script-assigned transforms unchanged. Reuse stored resource bounds without restarting or seeking animations, and specify how stage-mode changes and new resource loads re-enable automatic fitting. Reference CSS Values and Units and CSSOM View for CSS-derived meters, page zoom, visual viewport scaling, and devicePixelRatio. Remove displayed Issues 6 and 7 (GitHub immersive-web#1 and immersive-web#5) and regenerate index.html from the Bikeshed source. Validation: bikeshed --die-on=everything spec index.bs index.html; git diff --check.
Align the fitting text with the width and height content-attribute definitions merged in immersive-web#159. Use the element's actual laid-out content box for initial fitting, and explicitly distinguish used CSS dimensions from the desired dimensions specified by the attributes. Preserve the existing resize trigger and zero-size handling; leave the deferred IDL and general CSS sizing work out of this PR.
cabanier
force-pushed
the
fix-model-fit-math
branch
from
October 14, 2026 00:22
a2e2248 to
79ecd80
Compare
Reference CSS Box Model 3, CSS Cascading 5, CSS Sizing 3, and Geometry Interfaces 1 for content-box dimensions, used values, sizing properties, and point/matrix operations. Flag the proposed one-meter fallback for formats without declared or default length units as needing further discussion, using a native Bikeshed issue linked to immersive-web#155. Keep the fitting arithmetic and width/height attribute definitions unchanged. Strict Bikeshed validation passes.
Closed
AdaRoseCannon
approved these changes
Oct 14, 2026
AdaRoseCannon
left a comment
Member
There was a problem hiding this comment.
Thank you this is really well done and it matches the current behaviour.
github-actions Bot
added a commit
that referenced
this pull request
Oct 14, 2026
SHA: 165f495 Reason: push, by cabanier Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Address #155 and clears up other fitting behavior
Preview | Diff