summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
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(())