Skip to content

An on-screen FPS display for bevyengine.org

Notifications You must be signed in to change notification settings

jgmartin/bevy_screen_diags

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bevy diagnostics overlay

Crates.io Bevy tracking

bevy_screen_diags adds a very simple frames-per-second (FPS) display to your screen in Bevy.

Usage

Put the crate into your Cargo.toml.

bevy_screen_diags = "*"

Include the plugin when you build your App.

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_plugin(bevy_screen_diags::ScreenDiagsPlugin)
        //If a UI camera is already in your game remove the next line
        .add_startup_system(|mut commands: Commands| {commands.spawn_bundle(UiCameraBundle::default());})
        :
        :
}

Put the font you want to use in assets/fonts/screen-diags-font.ttf. If you want, you can use the font at that path in this project (which is FiraSans-Bold).

Example screen showing the FPS

The basic example just shows the FPS count on a grey background, but you can click your mouse on the window to add or remove the display.

Contributions to the crate are welcome.

About

An on-screen FPS display for bevyengine.org

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%