diff options
author | HampusM <hampus@hampusmat.com> | 2024-04-20 14:31:24 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-04-20 14:31:24 +0200 |
commit | a93dd51a378b29b76d256abf6270671e69464cf2 (patch) | |
tree | b38ea959e20dfe8ece47955d121c6dac994d543c /src | |
parent | 8efb76ed360796b614cec5d7eaa28b159832dbdd (diff) |
chore: use LightSource instead of removed builder
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 11 |
1 files changed, 5 insertions, 6 deletions
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<dyn Error>> 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() },)); |