From a93dd51a378b29b76d256abf6270671e69464cf2 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 20 Apr 2024 14:31:24 +0200 Subject: chore: use LightSource instead of removed builder --- src/main.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index f91e0c7..b8a14c4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,7 +7,7 @@ use engine::data_types::dimens::Dimens; use engine::ecs::sole::Single; use engine::event::Start as StartEvent; use engine::input::Extension as InputExtension; -use engine::lighting::LightSourceBuilder; +use engine::lighting::LightSource; use engine::material::Builder as MaterialBuilder; use engine::renderer::Extension as RendererExtension; use engine::shader::Program as ShaderProgram; @@ -56,11 +56,10 @@ fn main() -> Result<(), Box> ShaderProgram::new()?, )); - let light_source = LightSourceBuilder::new() - .position(Vec3 { x: 1.2, y: 1.0, z: 1.5 }) - .build(); - - engine.spawn((light_source,)); + engine.spawn((LightSource { + position: Vec3 { x: 1.2, y: 1.0, z: 1.5 }, + ..Default::default() + },)); engine.spawn((Camera { current: true, ..Default::default() },)); -- cgit v1.2.3-18-g5258