Struct bevy_tiled_camera::TiledProjection [−][src]
pub struct TiledProjection {
pub left: f32,
pub right: f32,
pub bottom: f32,
pub top: f32,
pub near: f32,
pub far: f32,
pub pixels_per_tile: u32,
pub target_tile_count: UVec2,
pub centered: bool,
// some fields omitted
}
Expand description
A camera projection which divides the view into a set number of tiles.
The projection will adjust itself based on your target pixels per tile and tile count. The camera view will be scaled up to fill the window as much as possible while displaying your target tile count and not deforming pixels.
Note that this projection assumes the size of one tile is equal to one world unit. This is different than Bevy’s default 2D orthographic camera which assumes one pixel is equal to one world unit.
There is currently a bug in bevy version 0.5 which prevents the view from updating unless you manually resize the window.
Fields
left: f32
right: f32
bottom: f32
top: f32
near: f32
far: f32
pixels_per_tile: u32
target_tile_count: UVec2
centered: bool
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TiledProjection
impl Send for TiledProjection
impl Sync for TiledProjection
impl Unpin for TiledProjection
impl UnwindSafe for TiledProjection
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert 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
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
impl<T> FromWorld for T where
T: Default,
impl<T> FromWorld for T where
T: Default,
pub fn from_world(_world: &mut World) -> T
pub fn from_world(_world: &mut World) -> T
Creates Self
using data from the given [World]
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more