From bf6993a4120e0484008bf4897ecd5ac64a4ed2b2 Mon Sep 17 00:00:00 2001 From: Danny McGee Date: Thu, 28 Sep 2023 15:02:05 -0400 Subject: [PATCH] Monitor framerate --- hello-world/src/main.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hello-world/src/main.rs b/hello-world/src/main.rs index 3fe511b..9f9e953 100644 --- a/hello-world/src/main.rs +++ b/hello-world/src/main.rs @@ -12,7 +12,13 @@ fn main() { App::new() .add_plugins((DefaultPlugins, OrbitCamPlugin, TestScenePlugin)) - .add_systems(Update, draw_world_axes.after(orbit_cam::pan_orbit_camera)) + .add_systems( + Update, + ( + draw_world_axes.after(orbit_cam::pan_orbit_camera), + report_framerate, + ), + ) .run(); } @@ -28,3 +34,8 @@ fn draw_world_axes(mut gizmos: Gizmos, q: Query<&OrbitCam>) { draw_axis(Vec3::Y, Color::GREEN); draw_axis(Vec3::Z, Color::BLUE); } + +fn report_framerate(time: Res