adjustAspectRatio Method
Adjust the aspect ratio of this ViewState so it matches the supplied value. The adjustment is accomplished by increasing one dimension and leaving the other unchanged, depending on the ratio of this ViewState's current aspect ratio to the supplied one. This means the result always shows everything in the current volume, plus potentially more.
adjustAspectRatio(aspect: number): void
note The automatic adjustment that happens when ViewStates are used in Viewports always adjusts the Y axis (making it potentially smaller). That's so that process can be reversible if the view's aspect ratio changes repeatedly (as happens when panels slide in/out, etc.)
Parameter | Type | Description |
---|---|---|
aspect | number |
Returns - void
Defined in
- core/frontend/src/ViewState.ts Line 856
Last Updated: 30 November, 2023