diff --git a/assets/editor/icons/light.png b/assets/editor/icons/light.png new file mode 100644 index 0000000..175eb65 Binary files /dev/null and b/assets/editor/icons/light.png differ diff --git a/src/NazaraEditor/Editor/Application.cpp b/src/NazaraEditor/Editor/Application.cpp index f278560..fd16bc9 100644 --- a/src/NazaraEditor/Editor/Application.cpp +++ b/src/NazaraEditor/Editor/Application.cpp @@ -54,12 +54,17 @@ namespace NzEditor Nz::DirectionalLight& light = lightComponent.AddLight(); light.UpdateRotation(Nz::Quaternionf::LookAt(Nz::Vector3f(-1, 0, -1), Nz::Vector3f::Up())); light.EnableShadowCasting(true); + + { + auto& cmp = directional.get(); + cmp.SetIcon("editor:/icons/light.png"); + } } - for (int i = 0; i < 1; ++i) + for (int i = 0; i < 5; ++i) { auto cube = CreateEntity(std::format("Cube_{}", i + 1)); - cube.get().SetPosition(Nz::Vector3f(i * 2, 0, 0)); + cube.get().SetPosition(Nz::Vector3f(i * 2, 0, i + 1)); Nz::GraphicsComponent& graphicsComponent = cube.emplace(); std::shared_ptr boxMesh = Nz::GraphicalMesh::Build(Nz::Primitive::Box(Nz::Vector3f(1.f), Nz::Vector3ui::Zero(), Nz::Matrix4f::Scale(Nz::Vector3f(1.f)), Nz::Rectf(0.f, 0.f, 2.f, 2.f)));