log only fps
This commit is contained in:
parent
3ea4fda9c5
commit
d1dbb78f07
11
src/lib.rs
11
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: Debug>(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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user