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: f32right: f32bottom: f32top: f32near: f32far: f32pixels_per_tile: u32target_tile_count: UVec2centered: bool

Implementations

Refers to how much the view is scaled up based on your pixels per tile and tile count settings.

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

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

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

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

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Performs the conversion.

Creates Self using data from the given [World]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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