Crate bevy_tiled_camera[−][src]
Expand description
A simple camera for properly displaying low resolution pixel perfect 2D games in bevy.
Example
use bevy_tiled_camera::*;
use bevy::prelude::*;
fn setup(mut commands:Commands) {
// Sets up a camera to display 80 x 25 tiles. The viewport will be scaled up
// as much as possible to fit the window size and maintain the appearance of
// 8 pixels per tile.
let camera_bundle = TiledCameraBundle::new()
.with_pixels_per_tile(8)
.with_tile_count((80,25).into()
);
commands.spawn_bundle(camera_bundle);
}
fn main() {
App::build()
.add_plugins(DefaultPlugins)
.add_plugin(TiledCameraPlugin)
.run();
}
Re-exports
pub use projection::TiledProjection;
Modules
Structs
A simple camera for properly displaying low resolution pixel perfect 2D games.