summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2023-11-21 21:19:25 +0100
committerHampusM <hampus@hampusmat.com>2023-11-21 21:19:25 +0100
commitfa46f545eb87ec8b5aba1f8bcddb4c90441e186b (patch)
treee995d75c6e8363768c12f4a28d626119386ba6b7 /src/main.rs
parentb0315b7ebc16fcbae6c3098db6c824f9057d2a71 (diff)
chore: remove usage of deleted struct LightSettings
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs26
1 files changed, 1 insertions, 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<dyn Error>>
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<dyn Error>>
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(())