From fa46f545eb87ec8b5aba1f8bcddb4c90441e186b Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 21 Nov 2023 21:19:25 +0100 Subject: chore: remove usage of deleted struct LightSettings --- src/main.rs | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9171b35..2488d16 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,7 +2,7 @@ use std::error::Error; use std::path::Path; use engine::color::Color; -use engine::lighting::{LightSettings, LightSourceBuilder}; +use engine::lighting::LightSourceBuilder; use engine::object::Id as ObjectId; use engine::texture::Texture; use engine::vector::{Vec2, Vec3}; @@ -33,12 +33,6 @@ fn main() -> Result<(), Box> let mut engine = Engine::new(&WINDOW_SIZE, "Yaaay lmao")?; - engine.set_light_settings(LightSettings { - ambient_light_strength: 0.1, - specular_light_strength: 0.5, - specular_shininess: 32, - }); - let cube = create_cube(|vertex_builder, side, _| { vertex_builder.color(match side { CubeSide::Top => BLUE, @@ -157,24 +151,6 @@ fn main() -> Result<(), Box> light_source .translate(back_left * light_source_speed * delta_time.as_secs_f32()); } - - if engine.is_key_pressed(Key::KpAdd).unwrap() { - let light_settings = engine.light_settings().unwrap().clone(); - - engine.set_light_settings(LightSettings { - ambient_light_strength: light_settings.ambient_light_strength + 0.2, - ..light_settings - }) - } - - if engine.is_key_pressed(Key::KpSubtract).unwrap() { - let light_settings = engine.light_settings().unwrap().clone(); - - engine.set_light_settings(LightSettings { - ambient_light_strength: light_settings.ambient_light_strength - 0.2, - ..light_settings - }) - } })?; Ok(()) -- cgit v1.2.3-18-g5258