Add framerate logging
This commit is contained in:
parent
9e103c0c05
commit
19671b8f28
|
@ -1,6 +1,10 @@
|
||||||
mod falling_sand;
|
mod falling_sand;
|
||||||
|
|
||||||
use bevy::{prelude::*, window::PresentMode};
|
use bevy::{
|
||||||
|
diagnostic::{FrameTimeDiagnosticsPlugin, LogDiagnosticsPlugin},
|
||||||
|
prelude::*,
|
||||||
|
window::PresentMode,
|
||||||
|
};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let window_plugin = WindowPlugin {
|
let window_plugin = WindowPlugin {
|
||||||
|
@ -19,6 +23,8 @@ fn main() {
|
||||||
.set(window_plugin)
|
.set(window_plugin)
|
||||||
.set(ImagePlugin::default_nearest()),
|
.set(ImagePlugin::default_nearest()),
|
||||||
)
|
)
|
||||||
|
.add_plugins(FrameTimeDiagnosticsPlugin)
|
||||||
|
.add_plugins(LogDiagnosticsPlugin::default())
|
||||||
.add_plugins(falling_sand::FallingSandPlugin)
|
.add_plugins(falling_sand::FallingSandPlugin)
|
||||||
.add_systems(Startup, setup)
|
.add_systems(Startup, setup)
|
||||||
.insert_resource(ClearColor(Color::rgb_u8(45, 42, 46)))
|
.insert_resource(ClearColor(Color::rgb_u8(45, 42, 46)))
|
||||||
|
|
Loading…
Reference in New Issue