Ability to customize frame fitting for different aspect ratios #3635
Replies: 1 comment
-
Yes, here it becomes clear that MV was primarily designed around the single-model orbit use case. The default framing focuses on height because it basically fits the model by revolving it around it's up axis and ensuring all parts will be visible from all camera orbit angles. Also, the default view has to allow a single poster image to be fit exactly over it regardless of the element's aspect ratio. Keeping the rest of the API sane during aspect ratio changes resulted in the behavior you're seeing. It's possible it could be improved, but it probably won't be easy given the constraints above. If you're interested in giving it a shot, I'll be happy to review a PR. I was definitely hoping this could be avoided by "adjusting the fov dynamically during aspect ratio changes" outside of MV. What problems have you run into there? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Model-Viewer does a good job at presenting a model and a seamless poster for approximately-square content.
However, it seems it's currently not possible to adjust whether height- or width- (or a mix) fitting is used; e.g. when the browser window is expanded horizontally, the height of the content stays the same, whereas in some cases it would be desired that the width of the content stays the same (or that a 50/50 mix is used).
Live Demo
Ideally, this could be chosen - choosing for the entire model would be fine, the desired behaviour is very content-dependant. The alternative would be to adjust field of view dynamically depending on aspect which would interfere with camera navigation and everything else.
An option would be to define an "authored aspect" for the model and then when changing aspect, the new one is either "fit inner" or "fit outer" or "something inbetween" to the authored aspect?
The current alternative (authoring everything in a portrait format) seems undesired since it leads to very far-away views on wide desktops and e.g. horizontal tablets that don't "look right".
Authored Landscape View

Resulting Portrait View (not good)

Version
Beta Was this translation helpful? Give feedback.
All reactions