diff options
author | HampusM <hampus@hampusmat.com> | 2024-05-22 20:23:32 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-05-22 20:23:32 +0200 |
commit | 8398025d7927564637e1ea67234665571dc7bcc5 (patch) | |
tree | 29dff89445a95d4361c014f8609025386213fe51 | |
parent | d9ab0016c8477f05a22ed569c0a70a5e9d68c3bb (diff) |
chore: use PointLight
-rw-r--r-- | src/main.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs index 2a4f9e1..6dc72a2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,7 +11,7 @@ use engine::event::Start as StartEvent; use engine::file_format::wavefront::mtl::parse as parse_mtl; use engine::file_format::wavefront::obj::parse as parse_obj; use engine::input::Extension as InputExtension; -use engine::lighting::{GlobalLight, LightSource}; +use engine::lighting::{GlobalLight, PointLight}; use engine::material::{Builder as MaterialBuilder, Flags as MaterialFlags}; use engine::renderer::Extension as RendererExtension; use engine::shader::Program as ShaderProgram; @@ -70,10 +70,7 @@ fn main() -> Result<(), Box<dyn Error>> )); engine.spawn(( - LightSource { - diffuse: YELLOW, - ..Default::default() - }, + PointLight::builder().diffuse(YELLOW).build(), Transform { position: Vec3 { x: -6.0, y: 3.0, z: 3.0 }, ..Default::default() |