Enum let_engine::camera::CameraScaling
source · pub enum CameraScaling {
Stretch = 1,
Linear = 2,
Circle = 3,
Limited = 4,
Expand = 5,
}
Expand description
The 4 Camera scaling modes determine how far you can see when the window changes scale. For 2D games those are a problem because there will always be someone with a monitor or window with a weird aspect ratio that can see much more than others when it’s not on stretch mode. Those are the options in this game engine:
Variants§
Stretch = 1
Goes from -1 to 1 in both x and y. So the camera view stretches when the window is not square.
Linear = 2
Tries to have the same width*height surface area all the time. When Making the window really thin you can see the same surface area, so you could see really far.
Circle = 3
It’s similar to Linear but you can’t look that far the tighter the window is.
Limited = 4
The biggest side is always -1 to 1. Simple and more unfair the tighter your window is.
Expand = 5
The bigger the window is the more you can see. Good for HUDs, text and textures.
Trait Implementations§
source§impl Clone for CameraScaling
impl Clone for CameraScaling
source§fn clone(&self) -> CameraScaling
fn clone(&self) -> CameraScaling
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CameraScaling
impl Debug for CameraScaling
source§impl Default for CameraScaling
impl Default for CameraScaling
source§impl PartialEq for CameraScaling
impl PartialEq for CameraScaling
source§fn eq(&self, other: &CameraScaling) -> bool
fn eq(&self, other: &CameraScaling) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for CameraScaling
impl StructuralPartialEq for CameraScaling
Auto Trait Implementations§
impl RefUnwindSafe for CameraScaling
impl Send for CameraScaling
impl Sync for CameraScaling
impl Unpin for CameraScaling
impl UnwindSafe for CameraScaling
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.