#[non_exhaustive]pub enum Aspect {
Wide,
Standard,
Square,
Ultrawide,
Photo,
Portrait,
Ratio(f32, f32),
}Expand description
The aspect ratio (width / height) of a scene.
The named ratios have CSS rules in three.css, so the size is correct
before JavaScript runs. init.js applies a Aspect::Ratio.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Wide
16 / 9 (default).
Standard
4 / 3.
Square
1 / 1.
Ultrawide
21 / 9.
Photo
3 / 2.
Portrait
3 / 4.
Ratio(f32, f32)
A custom width / height. Both must be finite and positive, else
the scene uses Aspect::Wide. The ratio is clamped to 0.1..=10.
Trait Implementations§
impl Copy for Aspect
impl StructuralPartialEq for Aspect
Auto Trait Implementations§
impl Forget for Aspect
impl Freeze for Aspect
impl RefUnwindSafe for Aspect
impl Send for Aspect
impl Sync for Aspect
impl Unpin for Aspect
impl UnsafeUnpin for Aspect
impl UnwindSafe for Aspect
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Scoped for T
impl<T> Scoped for T
Source§fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
Open a deferred
ScopeQuery for this type. Resolves the
registered scope at .load() time, not here.