add FPS diagnostics

This commit is contained in:
yuni 2024-03-17 14:55:09 +01:00
parent 9c2b2e4e0f
commit 56c76eaee0

View file

@ -5,6 +5,7 @@ mod world;
mod settings;
use bevy::window::{Window, WindowMode, PrimaryWindow, CursorGrabMode };
use bevy::diagnostic::{FrameTimeDiagnosticsPlugin, LogDiagnosticsPlugin};
use bevy::prelude::*;
fn main() {
@ -24,6 +25,10 @@ fn main() {
))
.add_plugins(DefaultPlugins.set(ImagePlugin::default_nearest()))
.add_plugins(camera::CameraControllerPlugin)
.add_plugins((
FrameTimeDiagnosticsPlugin,
LogDiagnosticsPlugin::default(),
))
.run();
}