Crates.io | bevy_retro_camera |
lib.rs | bevy_retro_camera |
version | 1.1.0 |
source | src |
created_at | 2022-08-24 19:50:38.919926 |
updated_at | 2022-08-25 18:40:14.917265 |
description | Scaled pixel-perfect rendering camera for Bevy |
homepage | https://github.com/celerysaltgames/bevy_retro_camera |
repository | https://github.com/celerysaltgames/bevy_retro_camera |
max_upload_size | |
id | 651780 |
size | 96,380 |
Bevy Retro camera is a 2D, pixel-perfect camera for Bevy. It does work for Bevy 0.8.
Create a startup system and use RetroCameraBundle
to create a camera. It's also recommended to add the RetroCameraPlugin
to disable the blur effect due to Bevy's default rendering configuration.
// Add RetroCameraPlugin to you app + a startup system
fn main() {
App::new()
.add_plugin(RetroCameraPlugin)
.add_startup_system(setup)
}
// Configure your startup system
fn setup(mut commands: Commands) {
let height: f32 = 240.0; // Viewport size
let scale: f32 = 1.0; // Viewport scaling factor
commands.spawn_bundle(RetroCameraBundle::fixed_height(height, scale));
}
Bevy | bevy_retro_camera |
---|---|
0.8 | 1.0 |