From d1dbb78f0793ecf2b89ab4ae26eaf49fe4097475 Mon Sep 17 00:00:00 2001 From: Arkitu <85173315+Arkitu@users.noreply.github.com> Date: Tue, 24 Dec 2024 09:49:17 +0100 Subject: [PATCH] log only fps --- src/lib.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index d55386c..e371187 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -9,7 +9,7 @@ use log::debug; // use state::State; // use graphics::Graphics; use winit::{application::ApplicationHandler, dpi::PhysicalSize, event::{Event, WindowEvent}, event_loop::EventLoop, window::{Window, WindowAttributes}}; -use bevy::app::App; +use bevy::{prelude::*, diagnostic::{FrameTimeDiagnosticsPlugin, LogDiagnosticsPlugin}}; pub fn dbg(v: V) -> V { debug!(target: "app", "{:?}", v); @@ -100,15 +100,16 @@ pub fn main() { // (event_loop, window) // }; - use bevy::{diagnostic::{FrameTimeDiagnosticsPlugin, LogDiagnosticsPlugin}, DefaultPlugins}; - App::new() - .add_plugins(DefaultPlugins) .add_plugins(( + DefaultPlugins, camera::Plugin, map::Plugin, FrameTimeDiagnosticsPlugin, - LogDiagnosticsPlugin::default() + LogDiagnosticsPlugin { + filter: Some(vec![FrameTimeDiagnosticsPlugin::FPS]), + ..Default::default() + } )) .run(); }