Skip to content

Commit 8cd5589

Browse files
Added bevy_atmosphere to add a sky
1 parent f0bf78b commit 8cd5589

File tree

4 files changed

+31
-1
lines changed

4 files changed

+31
-1
lines changed

Cargo.lock

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ bevy_renet = "0.0.12"
1515
bincode = "1.3.3"
1616
serde = { version = "1.0", features = ["derive"] }
1717
ron = "0.6"
18+
bevy_atmosphere = "0.10.0"

client/src/camera/spawn.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use bevy::prelude::*;
2+
use bevy_atmosphere::prelude::AtmosphereCamera;
23
use bevy_mod_raycast::prelude::*;
34

45
#[derive(TypePath)]
@@ -35,5 +36,6 @@ pub fn spawn_camera(mut commands: Commands) {
3536
let mut raycast_source = RaycastSource::<BlockRaycastSet>::default(); // Initialisation par défaut
3637
raycast_source.cast_method = RaycastMethod::Transform; // Utilise la transformation de la caméra pour lancer le rayon
3738
raycast_source // Retourne l'objet
38-
});
39+
})
40+
.insert(AtmosphereCamera::default());
3941
}

client/src/game.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use bevy::app::MainScheduleOrder;
22
use bevy::ecs::schedule::ScheduleLabel;
33
use bevy::prelude::*;
4+
use bevy_atmosphere::prelude::*;
45
use chat::{render_chat, setup_chat};
56

67
use crate::debug::BlockDebugWireframeSettings;
@@ -50,6 +51,7 @@ pub fn game_plugin(app: &mut App) {
5051
.add_plugins(DeferredRaycastingPlugin::<BlockRaycastSet>::default()) // Ajout du plugin raycasting
5152
.add_plugins(WireframePlugin)
5253
.add_plugins(bevy_simple_text_input::TextInputPlugin)
54+
.add_plugins(AtmospherePlugin)
5355
.insert_resource(AmbientLight {
5456
color: Color::WHITE,
5557
brightness: 400.0,

0 commit comments

Comments
 (0)