sprite_flipping/
sprite_flipping.rs

1//! Displays a single [`Sprite`], created from an image, but flipped on one axis.
2
3use bevy::prelude::*;
4
5fn main() {
6    App::new()
7        .add_plugins(DefaultPlugins)
8        .add_systems(Startup, setup)
9        .run();
10}
11
12fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
13    commands.spawn(Camera2d);
14
15    commands.spawn(Sprite {
16        image: asset_server.load("branding/bevy_bird_dark.png"),
17        // Flip the logo to the left
18        flip_x: true,
19        // And don't flip it upside-down ( the default )
20        flip_y: false,
21        ..Default::default()
22    });
23}