From 5edc05df89974c07231206f5c5dc32eae61aba28 Mon Sep 17 00:00:00 2001 From: hut Date: Sun, 31 Mar 2024 22:08:26 +0200 Subject: [PATCH] cleanup --- src/camera.rs | 6 +++--- src/main.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/camera.rs b/src/camera.rs index 05a3ff9..c8100a8 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -7,9 +7,9 @@ use bevy::transform::TransformSystem; use bevy_xpbd_3d::prelude::*; use crate::{settings, audio, actor}; -pub struct CameraControllerPlugin; +pub struct CameraPlugin; -impl Plugin for CameraControllerPlugin { +impl Plugin for CameraPlugin { fn build(&self, app: &mut App) { app.add_systems(Startup, setup_camera); app.add_systems(Update, handle_input); @@ -22,7 +22,6 @@ impl Plugin for CameraControllerPlugin { app.add_systems(PostUpdate, apply_input_to_player .after(PhysicsSet::Sync) .before(TransformSystem::TransformPropagate)); - app.insert_resource(ClearColor(Color::rgb(0.0, 0.0, 0.0))); } } @@ -34,6 +33,7 @@ pub fn setup_camera( Camera3dBundle { camera: Camera { hdr: true, // HDR is required for bloom + clear_color: ClearColorConfig::Custom(Color::BLACK), ..default() }, tonemapping: Tonemapping::TonyMcMapface, diff --git a/src/main.rs b/src/main.rs index 41fabdb..6891f70 100644 --- a/src/main.rs +++ b/src/main.rs @@ -51,7 +51,7 @@ impl Plugin for OutFlyPlugin { FrameTimeDiagnosticsPlugin, world::WorldPlugin, - camera::CameraControllerPlugin, + camera::CameraPlugin, commands::CommandsPlugin, hud::HudPlugin, actor::ActorPlugin,