diff options
Diffstat (limited to 'world/src')
-rw-r--r-- | world/src/main.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/world/src/main.rs b/world/src/main.rs index c0b6833..546b73b 100644 --- a/world/src/main.rs +++ b/world/src/main.rs @@ -70,6 +70,17 @@ fn main() -> Result<()> { if let Some(mesh) = node.mesh() { import_mesh(mesh, &buffers, &store, path_base, &node, &mut prefab)?; } + let (position, _, _) = node.transform().decomposed(); + if let Some(light) = node.light() { + let emission = Some(Vec3A::from_array(light.color()) * light.intensity()); + prefab.light.push(( + Vec3A::from_array(position), + store.set(&LightPart { + emission, + ..Default::default() + })?, + )); + } } prefab.light.push(( |