Repository: GameDevTecnico/cubos
Pull request #1488: Add infinite terrain profiling sample
Author: login: tomas7770
Labels: name: A-Engine
name: B-Rendering
name: C-Optimization
name: P-Urgent
description: This issue is a big priority, and it would be good to close it ASAP
Created: 2025-04-12T19:19:04Z | Merged: 2025-04-14T12:02:14Z

# Description

Adds a rendering sample with an infinite, procedurally generated terrain, to test performance of a scene with lots of voxels.

## Checklist

- [x] Self-review changes.
- [ ] Evaluate impact on the documentation.
- [ ] Ensure test coverage.
- [x] Write new samples.
- [x] Add entry to the changelog's unreleased section.



Diff:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index df13898bf..d6b6d2ad8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 - Entity destruction detection to observers (#1458, **@kuukitenshi**).
 - Added CollisionGroup component to support internal collision layer overrides (#535, **@fallenatlas**).
 - Perform frustum culling for voxel meshes (#1183, **@mkuritsu**).
+- Infinite terrain profiling sample (#1487, **@tomas7770**).
 
 ### Changed
 
diff --git a/engine/samples/CMakeLists.txt b/engine/samples/CMakeLists.txt
index 8859a7ce9..71953a55f 100644
--- a/engine/samples/CMakeLists.txt
+++ b/engine/samples/CMakeLists.txt
@@ -60,6 +60,7 @@ make_sample(DIR "assets/json" ASSETS)
 make_sample(DIR "assets/saving" ASSETS NO_WEB) # Can't save assets on Emscripten!
 make_sample(DIR "render/main" ASSETS)
 make_sample(DIR "render/shadows" ASSETS)
+make_sample(DIR "render/profiling" ASSETS)
 make_sample(DIR "imgui")
 make_sample(DIR "collisions" ASSETS)
 make_sample(DIR "voxel-shape-collisions" ASSETS)
diff --git a/engine/samples/render/profiling/assets/main.cubos b/engine/samples/render/profiling/assets/main.cubos
new file mode 100644
index 000000000..6e652255c
--- /dev/null
+++ b/engine/samples/render/profiling/assets/main.cubos
@@ -0,0 +1,32 @@
+{
+    "entities": {
+        "render-target": {
+            "cubos::engine::RenderTargetDefaults": {}
+        },
+        "camera": {
+            "cubos::engine::PerspectiveCamera": 60.0,
+            "cubos::engine::DrawsTo@render-target": {},
+            "cubos::engine::Position": {
+                "x": 64,
+                "y": 30,
+                "z": 150
+            }
+        },
+        "sun": {
+            "cubos::engine::DirectionalLight": {
+                "color": {
+                    "x": 1.0,
+                    "y": 1.0,
+                    "z": 1.0
+                },
+                "intensity": 1.0
+            },
+            "cubos::engine::Rotation": {
+                "w": -0.5263455,
+                "x": -0.7605053,
+                "y": -0.3802527,
+                "z": 0.0
+            }
+        }
+    }
+}
diff --git a/engine/samples/render/profiling/assets/main.cubos.meta b/engine/samples/render/profiling/assets/main.cubos.meta
new file mode 100644
index 000000000..182b592b3
--- /dev/null
+++ b/engine/samples/render/profiling/assets/main.cubos.meta
@@ -0,0 +1,3 @@
+{
+    "id": "9671dc21-e800-4e8b-ab15-e18d9749d233"
+}
\ No newline at end of file
diff --git a/engine/samples/render/profiling/main.cpp b/engine/samples/render/profiling/main.cpp
new file mode 100644
index 000000000..4c554250a
--- /dev/null
+++ b/engine/samples/render/profiling/main.cpp
@@ -0,0 +1,143 @@
+#include <unordered_map>
+
+#include <glm/gtc/noise.hpp>
+#include <glm/gtx/hash.hpp>
+
+#include <cubos/core/reflection/external/primitives.hpp>
+
+#include <cubos/engine/assets/plugin.hpp>
+#include <cubos/engine/defaults/plugin.hpp>
+#include <cubos/engine/render/camera/camera.hpp>
+#include <cubos/engine/render/lights/environment.hpp>
+#include <cubos/engine/render/voxels/grid.hpp>
+#include <cubos/engine/render/voxels/palette.hpp>
+#include <cubos/engine/scene/plugin.hpp>
+#include <cubos/engine/settings/plugin.hpp>
+#include <cubos/engine/tools/plugin.hpp>
+#include <cubos/engine/transform/plugin.hpp>
+#include <cubos/engine/utils/free_camera/plugin.hpp>
+#include <cubos/engine/voxels/plugin.hpp>
+#include <cubos/engine/window/plugin.hpp>
+
+using namespace cubos::engine;
+
+static const Asset<Scene> SceneAsset = AnyAsset("9671dc21-e800-4e8b-ab15-e18d9749d233");
+
+struct ChunkMap
+{
+    CUBOS_ANONYMOUS_REFLECT(ChunkMap);
+
+    std::unordered_map<glm::vec2, bool> chunkExists;
+};
+
+int main(int argc, char** argv)
+{
+    Cubos cubos{argc, argv};
+
+    /// [Adding the plugins]
+    cubos.plugin(defaultsPlugin);
+    cubos.plugin(freeCameraPlugin);
+    cubos.plugin(toolsPlugin);
+    /// [Adding the plugins]
+
+    cubos.resource<ChunkMap>();
+
+    cubos.startupSystem("configure settings").before(settingsTag).call([](Settings& settings) {
+        settings.setString("assets.app.osPath", APP_ASSETS_PATH);
+        settings.setString("assets.builtin.osPath", BUILTIN_ASSETS_PATH);
+        settings.setInteger("renderMeshPool.bucketCount", 2048);
+    });
+
+    cubos.startupSystem("set the palette and environment and spawn the scene")
+        .tagged(assetsTag)
+        .call([](Commands commands, Assets& assets, RenderPalette& palette, RenderEnvironment& environment) {
+            // Create a simple palette with 3 materials (red, green and blue).
+            palette.asset = assets.create(VoxelPalette{{
+                {{0, 1, 0, 1}},
+            }});
+            // Environment
+            environment.ambient = {0.1F, 0.1F, 0.1F};
+            environment.skyGradient[0] = {0.1F, 0.2F, 0.4F};
+            environment.skyGradient[1] = {0.6F, 0.6F, 0.8F};
+            // Spawn base scene
+            commands.spawn(assets.read(SceneAsset)->blueprint);
+        });
+
+    cubos.system("update chunks")
+        .call([](Commands commands, Assets& assets, Query<Entity, const RenderVoxelGrid&, const Position&> chunks,
+                 Query<const Camera&, const Position&> cameras, ChunkMap& chunkMap) {
+            constexpr float ChunkSize = 32.0F;
+            constexpr int GenRadiusChunks = 16;
+            for (auto [camera, position] : cameras)
+            {
+                if (!camera.active)
+                {
+                    return;
+                }
+                for (int x = -GenRadiusChunks; x < GenRadiusChunks; x++)
+                {
+                    for (int z = -GenRadiusChunks; z < GenRadiusChunks; z++)
+                    {
+                        float posX = float(x + static_cast<int>(position.vec.x / ChunkSize)) * ChunkSize;
+                        float posZ = float(z + static_cast<int>(position.vec.z / ChunkSize)) * ChunkSize;
+                        if (!chunkMap.chunkExists.contains(glm::vec2(posX, posZ)))
+                        {
+                            chunkMap.chunkExists[glm::vec2(posX, posZ)] = true;
+                            // Create a perlin noise terrain.
+                            glm::uvec3 gridSize = {static_cast<int>(ChunkSize), 32, static_cast<int>(ChunkSize)};
+                            auto voxelGrid = VoxelGrid{gridSize};
+                            for (glm::uint gx = 0; gx < gridSize.x; gx++)
+                            {
+                                for (glm::uint gz = 0; gz < gridSize.z; gz++)
+                                {
+                                    auto noise = 0.5F + 0.5F * glm::perlin(0.05F * glm::vec2(float(gx) + posX,
+                                                                                             float(gz) + posZ));
+                                    for (glm::uint gy = 0;
+                                         gy < static_cast<glm::uint>(static_cast<float>(gridSize.y) * noise); gy++)
+                                    {
+                                        voxelGrid.set({gx, gy, gz}, 1);
+                                    }
+                                }
+                            }
+                            auto gridAsset = assets.create(voxelGrid);
+                            // Spawn an entity with a renderable grid component and a identity transform.
+                            commands.create()
+                                .add(RenderVoxelGrid{gridAsset, {-1.0F, 0.0F, -1.0F}})
+                                .add(LocalToWorld{})
+                                .add(Position{{posX, 0.0F, posZ}});
+                        }
+                    }
+                }
+                std::vector<Entity> removedChunks;
+                float minX = float(-GenRadiusChunks + static_cast<int>(position.vec.x / ChunkSize)) * ChunkSize;
+                float maxX = float(GenRadiusChunks + static_cast<int>(position.vec.x / ChunkSize)) * ChunkSize;
+                float minZ = float(-GenRadiusChunks + static_cast<int>(position.vec.z / ChunkSize)) * ChunkSize;
+                float maxZ = float(GenRadiusChunks + static_cast<int>(position.vec.z / ChunkSize)) * ChunkSize;
+                for (auto [entity, grid, gridPosition] : chunks)
+                {
+                    if (gridPosition.vec.x < minX || gridPosition.vec.x > maxX || gridPosition.vec.z < minZ ||
+                        gridPosition.vec.z > maxZ)
+                    {
+                        removedChunks.push_back(entity);
+                        chunkMap.chunkExists.erase(glm::vec2(gridPosition.vec.x, gridPosition.vec.z));
+                    }
+                }
+                for (auto& chunkEntity : removedChunks)
+                {
+                    commands.destroy(chunkEntity);
+                }
+            }
+        });
+
+    cubos.system("move camera").call([](Query<const Camera&, Position&> cameras, DeltaTime& dt) {
+        for (auto [camera, position] : cameras)
+        {
+            if (!camera.active)
+            {
+                return;
+            }
+            position.vec += glm::vec3(0.0F, 0.0F, -30.0F * dt.value());
+        }
+    });
+    cubos.run();
+}


Reviews:
user: login: github-actions[bot]
body: :warning: `Clang-Tidy` found issue(s) with the introduced code (1/2)
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-12T19:54:49Z
user: login: github-actions[bot]
body: :warning: `Clang-Tidy` found issue(s) with the introduced code (2/2)
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-12T19:55:00Z
user: login: github-actions[bot]
body: :warning: `Clang-Tidy` found issue(s) with the introduced code (1/1)
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-12T21:06:02Z
user: login: mkuritsu
body: LGTM
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-13T02:46:13Z
user: login: RiscadoA
body: LGTM! Ty for working on this :relieved: 
state: APPROVED
author_association: MEMBER
submitted_at: 2025-04-14T07:17:48Z

Review comments:
diff_hunk: @@ -0,0 +1,139 @@
+#include <unordered_map>
+
+#include <glm/gtc/noise.hpp>
+#include <glm/gtx/hash.hpp>
+
+#include <cubos/core/reflection/external/primitives.hpp>
+
+#include <cubos/engine/assets/plugin.hpp>
+#include <cubos/engine/defaults/plugin.hpp>
+#include <cubos/engine/render/camera/camera.hpp>
+#include <cubos/engine/render/lights/environment.hpp>
+#include <cubos/engine/render/voxels/grid.hpp>
+#include <cubos/engine/render/voxels/palette.hpp>
+#include <cubos/engine/scene/plugin.hpp>
+#include <cubos/engine/settings/plugin.hpp>
+#include <cubos/engine/tools/plugin.hpp>
+#include <cubos/engine/transform/plugin.hpp>
+#include <cubos/engine/utils/free_camera/plugin.hpp>
+#include <cubos/engine/voxels/plugin.hpp>
+#include <cubos/engine/window/plugin.hpp>
+
+using namespace cubos::engine;
+
+static const Asset<Scene> SceneAsset = AnyAsset("9671dc21-e800-4e8b-ab15-e18d9749d233");
+
+struct ChunkMap
+{
+    CUBOS_ANONYMOUS_REFLECT(ChunkMap);
+
+    std::unordered_map<glm::vec2, bool> chunkExists;
+};
+
+int main(int argc, char** argv)
+{
+    Cubos cubos{argc, argv};
+
+    /// [Adding the plugins]
+    cubos.plugin(defaultsPlugin);
+    cubos.plugin(freeCameraPlugin);
+    cubos.plugin(toolsPlugin);
+    /// [Adding the plugins]
+
+    cubos.resource<ChunkMap>();
+
+    cubos.startupSystem("configure settings").before(settingsTag).call([](Settings& settings) {
+        settings.setString("assets.app.osPath", APP_ASSETS_PATH);
+        settings.setString("assets.builtin.osPath", BUILTIN_ASSETS_PATH);
+        settings.setInteger("renderMeshPool.bucketCount", 2048);
+    });
+
+    cubos.startupSystem("set the palette and environment and spawn the scene")
+        .tagged(assetsTag)
+        .call([](Commands commands, Assets& assets, RenderPalette& palette, RenderEnvironment& environment) {
+            // Create a simple palette with 3 materials (red, green and blue).
+            palette.asset = assets.create(VoxelPalette{{
+                {{0, 1, 0, 1}},
+            }});
+            // Environment
+            environment.ambient = {0.1F, 0.1F, 0.1F};
+            environment.skyGradient[0] = {0.1F, 0.2F, 0.4F};
+            environment.skyGradient[1] = {0.6F, 0.6F, 0.8F};
+            // Spawn base scene
+            commands.spawn(assets.read(SceneAsset)->blueprint);
+        });
+
+    cubos.system("update chunks")
+        .call([](Commands commands, Assets& assets, Query<Entity, const RenderVoxelGrid&, const Position&> chunks,
+                 Query<const Camera&, const Position&> cameras, ChunkMap& chunkMap) {
+            constexpr float chunkSize = 32.0F;
path: engine/samples/render/profiling/main.cpp
user: login: github-actions[bot]
body: :warning: **readability\-identifier\-naming** :warning:
invalid case style for constexpr variable `` chunkSize ``
```suggestion
            constexpr float ChunkSize = 32.0F;
```
created_at: 2025-04-12T19:54:47Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,139 @@
+#include <unordered_map>
+
+#include <glm/gtc/noise.hpp>
+#include <glm/gtx/hash.hpp>
+
+#include <cubos/core/reflection/external/primitives.hpp>
+
+#include <cubos/engine/assets/plugin.hpp>
+#include <cubos/engine/defaults/plugin.hpp>
+#include <cubos/engine/render/camera/camera.hpp>
+#include <cubos/engine/render/lights/environment.hpp>
+#include <cubos/engine/render/voxels/grid.hpp>
+#include <cubos/engine/render/voxels/palette.hpp>
+#include <cubos/engine/scene/plugin.hpp>
+#include <cubos/engine/settings/plugin.hpp>
+#include <cubos/engine/tools/plugin.hpp>
+#include <cubos/engine/transform/plugin.hpp>
+#include <cubos/engine/utils/free_camera/plugin.hpp>
+#include <cubos/engine/voxels/plugin.hpp>
+#include <cubos/engine/window/plugin.hpp>
+
+using namespace cubos::engine;
+
+static const Asset<Scene> SceneAsset = AnyAsset("9671dc21-e800-4e8b-ab15-e18d9749d233");
+
+struct ChunkMap
+{
+    CUBOS_ANONYMOUS_REFLECT(ChunkMap);
+
+    std::unordered_map<glm::vec2, bool> chunkExists;
+};
+
+int main(int argc, char** argv)
+{
+    Cubos cubos{argc, argv};
+
+    /// [Adding the plugins]
+    cubos.plugin(defaultsPlugin);
+    cubos.plugin(freeCameraPlugin);
+    cubos.plugin(toolsPlugin);
+    /// [Adding the plugins]
+
+    cubos.resource<ChunkMap>();
+
+    cubos.startupSystem("configure settings").before(settingsTag).call([](Settings& settings) {
+        settings.setString("assets.app.osPath", APP_ASSETS_PATH);
+        settings.setString("assets.builtin.osPath", BUILTIN_ASSETS_PATH);
+        settings.setInteger("renderMeshPool.bucketCount", 2048);
+    });
+
+    cubos.startupSystem("set the palette and environment and spawn the scene")
+        .tagged(assetsTag)
+        .call([](Commands commands, Assets& assets, RenderPalette& palette, RenderEnvironment& environment) {
+            // Create a simple palette with 3 materials (red, green and blue).
+            palette.asset = assets.create(VoxelPalette{{
+                {{0, 1, 0, 1}},
+            }});
+            // Environment
+            environment.ambient = {0.1F, 0.1F, 0.1F};
+            environment.skyGradient[0] = {0.1F, 0.2F, 0.4F};
+            environment.skyGradient[1] = {0.6F, 0.6F, 0.8F};
+            // Spawn base scene
+            commands.spawn(assets.read(SceneAsset)->blueprint);
+        });
+
+    cubos.system("update chunks")
+        .call([](Commands commands, Assets& assets, Query<Entity, const RenderVoxelGrid&, const Position&> chunks,
+                 Query<const Camera&, const Position&> cameras, ChunkMap& chunkMap) {
+            constexpr float chunkSize = 32.0F;
+            constexpr int genRadiusChunks = 16;
+            for (auto [camera, position] : cameras)
+            {
+                if (!camera.active)
+                    return;
+                for (int x = -genRadiusChunks; x < genRadiusChunks; x++)
+                {
+                    for (int z = -genRadiusChunks; z < genRadiusChunks; z++)
+                    {
+                        float posX = float(x + static_cast<int>(position.vec.x / chunkSize)) * chunkSize;
+                        float posZ = float(z + static_cast<int>(position.vec.z / chunkSize)) * chunkSize;
path: engine/samples/render/profiling/main.cpp
user: login: github-actions[bot]
body: :warning: **readability\-identifier\-naming** :warning:
invalid case style for constexpr variable `` chunkSize ``
```suggestion
                        float posX = float(x + static_cast<int>(position.vec.x / ChunkSize)) * ChunkSize;
                        float posZ = float(z + static_cast<int>(position.vec.z / ChunkSize)) * ChunkSize;
```
created_at: 2025-04-12T19:54:48Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,139 @@
+#include <unordered_map>
+
+#include <glm/gtc/noise.hpp>
+#include <glm/gtx/hash.hpp>
+
+#include <cubos/core/reflection/external/primitives.hpp>
+
+#include <cubos/engine/assets/plugin.hpp>
+#include <cubos/engine/defaults/plugin.hpp>
+#include <cubos/engine/render/camera/camera.hpp>
+#include <cubos/engine/render/lights/environment.hpp>
+#include <cubos/engine/render/voxels/grid.hpp>
+#include <cubos/engine/render/voxels/palette.hpp>
+#include <cubos/engine/scene/plugin.hpp>
+#include <cubos/engine/settings/plugin.hpp>
+#include <cubos/engine/tools/plugin.hpp>
+#include <cubos/engine/transform/plugin.hpp>
+#include <cubos/engine/utils/free_camera/plugin.hpp>
+#include <cubos/engine/voxels/plugin.hpp>
+#include <cubos/engine/window/plugin.hpp>
+
+using namespace cubos::engine;
+
+static const Asset<Scene> SceneAsset = AnyAsset("9671dc21-e800-4e8b-ab15-e18d9749d233");
+
+struct ChunkMap
+{
+    CUBOS_ANONYMOUS_REFLECT(ChunkMap);
+
+    std::unordered_map<glm::vec2, bool> chunkExists;
+};
+
+int main(int argc, char** argv)
+{
+    Cubos cubos{argc, argv};
+
+    /// [Adding the plugins]
+    cubos.plugin(defaultsPlugin);
+    cubos.plugin(freeCameraPlugin);
+    cubos.plugin(toolsPlugin);
+    /// [Adding the plugins]
+
+    cubos.resource<ChunkMap>();
+
+    cubos.startupSystem("configure settings").before(settingsTag).call([](Settings& settings) {
+        settings.setString("assets.app.osPath", APP_ASSETS_PATH);
+        settings.setString("assets.builtin.osPath", BUILTIN_ASSETS_PATH);
+        settings.setInteger("renderMeshPool.bucketCount", 2048);
+    });
+
+    cubos.startupSystem("set the palette and environment and spawn the scene")
+        .tagged(assetsTag)
+        .call([](Commands commands, Assets& assets, RenderPalette& palette, RenderEnvironment& environment) {
+            // Create a simple palette with 3 materials (red, green and blue).
+            palette.asset = assets.create(VoxelPalette{{
+                {{0, 1, 0, 1}},
+            }});
+            // Environment
+            environment.ambient = {0.1F, 0.1F, 0.1F};
+            environment.skyGradient[0] = {0.1F, 0.2F, 0.4F};
+            environment.skyGradient[1] = {0.6F, 0.6F, 0.8F};
+            // Spawn base scene
+            commands.spawn(assets.read(SceneAsset)->blueprint);
+        });
+
+    cubos.system("update chunks")
+        .call([](Commands commands, Assets& assets, Query<Entity, const RenderVoxelGrid&, const Position&> chunks,
+                 Query<const Camera&, const Position&> cameras, ChunkMap& chunkMap) {
+            constexpr float chunkSize = 32.0F;
+            constexpr int genRadiusChunks = 16;
+            for (auto [camera, position] : cameras)
+            {
+                if (!camera.active)
+                    return;
+                for (int x = -genRadiusChunks; x < genRadiusChunks; x++)
+                {
+                    for (int z = -genRadiusChunks; z < genRadiusChunks; z++)
+                    {
+                        float posX = float(x + static_cast<int>(position.vec.x / chunkSize)) * chunkSize;
+                        float posZ = float(z + static_cast<int>(position.vec.z / chunkSize)) * chunkSize;
+                        if (!chunkMap.chunkExists.contains(glm::vec2(posX, posZ)))
+                        {
+                            chunkMap.chunkExists[glm::vec2(posX, posZ)] = true;
+                            // Create a perlin noise terrain.
+                            glm::uvec3 gridSize = {static_cast<int>(chunkSize), 32, static_cast<int>(chunkSize)};
path: engine/samples/render/profiling/main.cpp
user: login: github-actions[bot]
body: :warning: **readability\-identifier\-naming** :warning:
invalid case style for constexpr variable `` chunkSize ``
```suggestion
                            glm::uvec3 gridSize = {static_cast<int>(ChunkSize), 32, static_cast<int>(ChunkSize)};
```
created_at: 2025-04-12T19:54:48Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,139 @@
+#include <unordered_map>
+
+#include <glm/gtc/noise.hpp>
+#include <glm/gtx/hash.hpp>
+
+#include <cubos/core/reflection/external/primitives.hpp>
+
+#include <cubos/engine/assets/plugin.hpp>
+#include <cubos/engine/defaults/plugin.hpp>
+#include <cubos/engine/render/camera/camera.hpp>
+#include <cubos/engine/render/lights/environment.hpp>
+#include <cubos/engine/render/voxels/grid.hpp>
+#include <cubos/engine/render/voxels/palette.hpp>
+#include <cubos/engine/scene/plugin.hpp>
+#include <cubos/engine/settings/plugin.hpp>
+#include <cubos/engine/tools/plugin.hpp>
+#include <cubos/engine/transform/plugin.hpp>
+#include <cubos/engine/utils/free_camera/plugin.hpp>
+#include <cubos/engine/voxels/plugin.hpp>
+#include <cubos/engine/window/plugin.hpp>
+
+using namespace cubos::engine;
+
+static const Asset<Scene> SceneAsset = AnyAsset("9671dc21-e800-4e8b-ab15-e18d9749d233");
+
+struct ChunkMap
+{
+    CUBOS_ANONYMOUS_REFLECT(ChunkMap);
+
+    std::unordered_map<glm::vec2, bool> chunkExists;
+};
+
+int main(int argc, char** argv)
+{
+    Cubos cubos{argc, argv};
+
+    /// [Adding the plugins]
+    cubos.plugin(defaultsPlugin);
+    cubos.plugin(freeCameraPlugin);
+    cubos.plugin(toolsPlugin);
+    /// [Adding the plugins]
+
+    cubos.resource<ChunkMap>();
+
+    cubos.startupSystem("configure settings").before(settingsTag).call([](Settings& settings) {
+        settings.setString("assets.app.osPath", APP_ASSETS_PATH);
+        settings.setString("assets.builtin.osPath", BUILTIN_ASSETS_PATH);
+        settings.setInteger("renderMeshPool.bucketCount", 2048);
+    });
+
+    cubos.startupSystem("set the palette and environment and spawn the scene")
+        .tagged(assetsTag)
+        .call([](Commands commands, Assets& assets, RenderPalette& palette, RenderEnvironment& environment) {
+            // Create a simple palette with 3 materials (red, green and blue).
+            palette.asset = assets.create(VoxelPalette{{
+                {{0, 1, 0, 1}},
+            }});
+            // Environment
+            environment.ambient = {0.1F, 0.1F, 0.1F};
+            environment.skyGradient[0] = {0.1F, 0.2F, 0.4F};
+            environment.skyGradient[1] = {0.6F, 0.6F, 0.8F};
+            // Spawn base scene
+            commands.spawn(assets.read(SceneAsset)->blueprint);
+        });
+
+    cubos.system("update chunks")
+        .call([](Commands commands, Assets& assets, Query<Entity, const RenderVoxelGrid&, const Position&> chunks,
+                 Query<const Camera&, const Position&> cameras, ChunkMap& chunkMap) {
+            constexpr float chunkSize = 32.0F;
+            constexpr int genRadiusChunks = 16;
+            for (auto [camera, position] : cameras)
+            {
+                if (!camera.active)
+                    return;
+                for (int x = -genRadiusChunks; x < genRadiusChunks; x++)
+                {
+                    for (int z = -genRadiusChunks; z < genRadiusChunks; z++)
+                    {
+                        float posX = float(x + static_cast<int>(position.vec.x / chunkSize)) * chunkSize;
+                        float posZ = float(z + static_cast<int>(position.vec.z / chunkSize)) * chunkSize;
+                        if (!chunkMap.chunkExists.contains(glm::vec2(posX, posZ)))
+                        {
+                            chunkMap.chunkExists[glm::vec2(posX, posZ)] = true;
+                            // Create a perlin noise terrain.
+                            glm::uvec3 gridSize = {static_cast<int>(chunkSize), 32, static_cast<int>(chunkSize)};
+                            auto voxelGrid = VoxelGrid{gridSize};
+                            for (glm::uint gx = 0; gx < gridSize.x; gx++)
+                            {
+                                for (glm::uint gz = 0; gz < gridSize.z; gz++)
+                                {
+                                    auto noise = 0.5F + 0.5F * glm::perlin(0.05F * glm::vec2(float(gx) + posX,
+                                                                                             float(gz) + posZ));
+                                    for (glm::uint gy = 0;
+                                         gy < static_cast<glm::uint>(static_cast<float>(gridSize.y) * noise); gy++)
+                                    {
+                                        voxelGrid.set({gx, gy, gz}, 1);
+                                    }
+                                }
+                            }
+                            auto gridAsset = assets.create(voxelGrid);
+                            // Spawn an entity with a renderable grid component and a identity transform.
+                            commands.create()
+                                .add(RenderVoxelGrid{gridAsset, {-1.0F, 0.0F, -1.0F}})
+                                .add(LocalToWorld{})
+                                .add(Position{{posX, 0.0F, posZ}});
+                        }
+                    }
+                }
+                std::vector<Entity> removedChunks;
+                float minX = float(-genRadiusChunks + static_cast<int>(position.vec.x / chunkSize)) * chunkSize;
+                float maxX = float(genRadiusChunks + static_cast<int>(position.vec.x / chunkSize)) * chunkSize;
+                float minZ = float(-genRadiusChunks + static_cast<int>(position.vec.z / chunkSize)) * chunkSize;
+                float maxZ = float(genRadiusChunks + static_cast<int>(position.vec.z / chunkSize)) * chunkSize;
path: engine/samples/render/profiling/main.cpp
user: login: github-actions[bot]
body: :warning: **readability\-identifier\-naming** :warning:
invalid case style for constexpr variable `` chunkSize ``
```suggestion
                float minX = float(-genRadiusChunks + static_cast<int>(position.vec.x / ChunkSize)) * ChunkSize;
                float maxX = float(genRadiusChunks + static_cast<int>(position.vec.x / ChunkSize)) * ChunkSize;
                float minZ = float(-genRadiusChunks + static_cast<int>(position.vec.z / ChunkSize)) * ChunkSize;
                float maxZ = float(genRadiusChunks + static_cast<int>(position.vec.z / ChunkSize)) * ChunkSize;
```
created_at: 2025-04-12T19:54:48Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,139 @@
+#include <unordered_map>
+
+#include <glm/gtc/noise.hpp>
+#include <glm/gtx/hash.hpp>
+
+#include <cubos/core/reflection/external/primitives.hpp>
+
+#include <cubos/engine/assets/plugin.hpp>
+#include <cubos/engine/defaults/plugin.hpp>
+#include <cubos/engine/render/camera/camera.hpp>
+#include <cubos/engine/render/lights/environment.hpp>
+#include <cubos/engine/render/voxels/grid.hpp>
+#include <cubos/engine/render/voxels/palette.hpp>
+#include <cubos/engine/scene/plugin.hpp>
+#include <cubos/engine/settings/plugin.hpp>
+#include <cubos/engine/tools/plugin.hpp>
+#include <cubos/engine/transform/plugin.hpp>
+#include <cubos/engine/utils/free_camera/plugin.hpp>
+#include <cubos/engine/voxels/plugin.hpp>
+#include <cubos/engine/window/plugin.hpp>
+
+using namespace cubos::engine;
+
+static const Asset<Scene> SceneAsset = AnyAsset("9671dc21-e800-4e8b-ab15-e18d9749d233");
+
+struct ChunkMap
+{
+    CUBOS_ANONYMOUS_REFLECT(ChunkMap);
+
+    std::unordered_map<glm::vec2, bool> chunkExists;
+};
+
+int main(int argc, char** argv)
+{
+    Cubos cubos{argc, argv};
+
+    /// [Adding the plugins]
+    cubos.plugin(defaultsPlugin);
+    cubos.plugin(freeCameraPlugin);
+    cubos.plugin(toolsPlugin);
+    /// [Adding the plugins]
+
+    cubos.resource<ChunkMap>();
+
+    cubos.startupSystem("configure settings").before(settingsTag).call([](Settings& settings) {
+        settings.setString("assets.app.osPath", APP_ASSETS_PATH);
+        settings.setString("assets.builtin.osPath", BUILTIN_ASSETS_PATH);
+        settings.setInteger("renderMeshPool.bucketCount", 2048);
+    });
+
+    cubos.startupSystem("set the palette and environment and spawn the scene")
+        .tagged(assetsTag)
+        .call([](Commands commands, Assets& assets, RenderPalette& palette, RenderEnvironment& environment) {
+            // Create a simple palette with 3 materials (red, green and blue).
+            palette.asset = assets.create(VoxelPalette{{
+                {{0, 1, 0, 1}},
+            }});
+            // Environment
+            environment.ambient = {0.1F, 0.1F, 0.1F};
+            environment.skyGradient[0] = {0.1F, 0.2F, 0.4F};
+            environment.skyGradient[1] = {0.6F, 0.6F, 0.8F};
+            // Spawn base scene
+            commands.spawn(assets.read(SceneAsset)->blueprint);
+        });
+
+    cubos.system("update chunks")
+        .call([](Commands commands, Assets& assets, Query<Entity, const RenderVoxelGrid&, const Position&> chunks,
+                 Query<const Camera&, const Position&> cameras, ChunkMap& chunkMap) {
+            constexpr float chunkSize = 32.0F;
+            constexpr int genRadiusChunks = 16;
path: engine/samples/render/profiling/main.cpp
user: login: github-actions[bot]
body: :warning: **readability\-identifier\-naming** :warning:
invalid case style for constexpr variable `` genRadiusChunks ``
```suggestion
            constexpr int GenRadiusChunks = 16;
```
created_at: 2025-04-12T19:54:48Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,139 @@
+#include <unordered_map>
+
+#include <glm/gtc/noise.hpp>
+#include <glm/gtx/hash.hpp>
+
+#include <cubos/core/reflection/external/primitives.hpp>
+
+#include <cubos/engine/assets/plugin.hpp>
+#include <cubos/engine/defaults/plugin.hpp>
+#include <cubos/engine/render/camera/camera.hpp>
+#include <cubos/engine/render/lights/environment.hpp>
+#include <cubos/engine/render/voxels/grid.hpp>
+#include <cubos/engine/render/voxels/palette.hpp>
+#include <cubos/engine/scene/plugin.hpp>
+#include <cubos/engine/settings/plugin.hpp>
+#include <cubos/engine/tools/plugin.hpp>
+#include <cubos/engine/transform/plugin.hpp>
+#include <cubos/engine/utils/free_camera/plugin.hpp>
+#include <cubos/engine/voxels/plugin.hpp>
+#include <cubos/engine/window/plugin.hpp>
+
+using namespace cubos::engine;
+
+static const Asset<Scene> SceneAsset = AnyAsset("9671dc21-e800-4e8b-ab15-e18d9749d233");
+
+struct ChunkMap
+{
+    CUBOS_ANONYMOUS_REFLECT(ChunkMap);
+
+    std::unordered_map<glm::vec2, bool> chunkExists;
+};
+
+int main(int argc, char** argv)
+{
+    Cubos cubos{argc, argv};
+
+    /// [Adding the plugins]
+    cubos.plugin(defaultsPlugin);
+    cubos.plugin(freeCameraPlugin);
+    cubos.plugin(toolsPlugin);
+    /// [Adding the plugins]
+
+    cubos.resource<ChunkMap>();
+
+    cubos.startupSystem("configure settings").before(settingsTag).call([](Settings& settings) {
+        settings.setString("assets.app.osPath", APP_ASSETS_PATH);
+        settings.setString("assets.builtin.osPath", BUILTIN_ASSETS_PATH);
+        settings.setInteger("renderMeshPool.bucketCount", 2048);
+    });
+
+    cubos.startupSystem("set the palette and environment and spawn the scene")
+        .tagged(assetsTag)
+        .call([](Commands commands, Assets& assets, RenderPalette& palette, RenderEnvironment& environment) {
+            // Create a simple palette with 3 materials (red, green and blue).
+            palette.asset = assets.create(VoxelPalette{{
+                {{0, 1, 0, 1}},
+            }});
+            // Environment
+            environment.ambient = {0.1F, 0.1F, 0.1F};
+            environment.skyGradient[0] = {0.1F, 0.2F, 0.4F};
+            environment.skyGradient[1] = {0.6F, 0.6F, 0.8F};
+            // Spawn base scene
+            commands.spawn(assets.read(SceneAsset)->blueprint);
+        });
+
+    cubos.system("update chunks")
+        .call([](Commands commands, Assets& assets, Query<Entity, const RenderVoxelGrid&, const Position&> chunks,
+                 Query<const Camera&, const Position&> cameras, ChunkMap& chunkMap) {
+            constexpr float chunkSize = 32.0F;
+            constexpr int genRadiusChunks = 16;
+            for (auto [camera, position] : cameras)
+            {
+                if (!camera.active)
+                    return;
+                for (int x = -genRadiusChunks; x < genRadiusChunks; x++)
path: engine/samples/render/profiling/main.cpp
user: login: github-actions[bot]
body: :warning: **readability\-identifier\-naming** :warning:
invalid case style for constexpr variable `` genRadiusChunks ``
```suggestion
                for (int x = -GenRadiusChunks; x < GenRadiusChunks; x++)
```
created_at: 2025-04-12T19:54:48Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,139 @@
+#include <unordered_map>
+
+#include <glm/gtc/noise.hpp>
+#include <glm/gtx/hash.hpp>
+
+#include <cubos/core/reflection/external/primitives.hpp>
+
+#include <cubos/engine/assets/plugin.hpp>
+#include <cubos/engine/defaults/plugin.hpp>
+#include <cubos/engine/render/camera/camera.hpp>
+#include <cubos/engine/render/lights/environment.hpp>
+#include <cubos/engine/render/voxels/grid.hpp>
+#include <cubos/engine/render/voxels/palette.hpp>
+#include <cubos/engine/scene/plugin.hpp>
+#include <cubos/engine/settings/plugin.hpp>
+#include <cubos/engine/tools/plugin.hpp>
+#include <cubos/engine/transform/plugin.hpp>
+#include <cubos/engine/utils/free_camera/plugin.hpp>
+#include <cubos/engine/voxels/plugin.hpp>
+#include <cubos/engine/window/plugin.hpp>
+
+using namespace cubos::engine;
+
+static const Asset<Scene> SceneAsset = AnyAsset("9671dc21-e800-4e8b-ab15-e18d9749d233");
+
+struct ChunkMap
+{
+    CUBOS_ANONYMOUS_REFLECT(ChunkMap);
+
+    std::unordered_map<glm::vec2, bool> chunkExists;
+};
+
+int main(int argc, char** argv)
+{
+    Cubos cubos{argc, argv};
+
+    /// [Adding the plugins]
+    cubos.plugin(defaultsPlugin);
+    cubos.plugin(freeCameraPlugin);
+    cubos.plugin(toolsPlugin);
+    /// [Adding the plugins]
+
+    cubos.resource<ChunkMap>();
+
+    cubos.startupSystem("configure settings").before(settingsTag).call([](Settings& settings) {
+        settings.setString("assets.app.osPath", APP_ASSETS_PATH);
+        settings.setString("assets.builtin.osPath", BUILTIN_ASSETS_PATH);
+        settings.setInteger("renderMeshPool.bucketCount", 2048);
+    });
+
+    cubos.startupSystem("set the palette and environment and spawn the scene")
+        .tagged(assetsTag)
+        .call([](Commands commands, Assets& assets, RenderPalette& palette, RenderEnvironment& environment) {
+            // Create a simple palette with 3 materials (red, green and blue).
+            palette.asset = assets.create(VoxelPalette{{
+                {{0, 1, 0, 1}},
+            }});
+            // Environment
+            environment.ambient = {0.1F, 0.1F, 0.1F};
+            environment.skyGradient[0] = {0.1F, 0.2F, 0.4F};
+            environment.skyGradient[1] = {0.6F, 0.6F, 0.8F};
+            // Spawn base scene
+            commands.spawn(assets.read(SceneAsset)->blueprint);
+        });
+
+    cubos.system("update chunks")
+        .call([](Commands commands, Assets& assets, Query<Entity, const RenderVoxelGrid&, const Position&> chunks,
+                 Query<const Camera&, const Position&> cameras, ChunkMap& chunkMap) {
+            constexpr float chunkSize = 32.0F;
+            constexpr int genRadiusChunks = 16;
+            for (auto [camera, position] : cameras)
+            {
+                if (!camera.active)
+                    return;
+                for (int x = -genRadiusChunks; x < genRadiusChunks; x++)
+                {
+                    for (int z = -genRadiusChunks; z < genRadiusChunks; z++)
path: engine/samples/render/profiling/main.cpp
user: login: github-actions[bot]
body: :warning: **readability\-identifier\-naming** :warning:
invalid case style for constexpr variable `` genRadiusChunks ``
```suggestion
                    for (int z = -GenRadiusChunks; z < GenRadiusChunks; z++)
```
created_at: 2025-04-12T19:54:48Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,139 @@
+#include <unordered_map>
+
+#include <glm/gtc/noise.hpp>
+#include <glm/gtx/hash.hpp>
+
+#include <cubos/core/reflection/external/primitives.hpp>
+
+#include <cubos/engine/assets/plugin.hpp>
+#include <cubos/engine/defaults/plugin.hpp>
+#include <cubos/engine/render/camera/camera.hpp>
+#include <cubos/engine/render/lights/environment.hpp>
+#include <cubos/engine/render/voxels/grid.hpp>
+#include <cubos/engine/render/voxels/palette.hpp>
+#include <cubos/engine/scene/plugin.hpp>
+#include <cubos/engine/settings/plugin.hpp>
+#include <cubos/engine/tools/plugin.hpp>
+#include <cubos/engine/transform/plugin.hpp>
+#include <cubos/engine/utils/free_camera/plugin.hpp>
+#include <cubos/engine/voxels/plugin.hpp>
+#include <cubos/engine/window/plugin.hpp>
+
+using namespace cubos::engine;
+
+static const Asset<Scene> SceneAsset = AnyAsset("9671dc21-e800-4e8b-ab15-e18d9749d233");
+
+struct ChunkMap
+{
+    CUBOS_ANONYMOUS_REFLECT(ChunkMap);
+
+    std::unordered_map<glm::vec2, bool> chunkExists;
+};
+
+int main(int argc, char** argv)
+{
+    Cubos cubos{argc, argv};
+
+    /// [Adding the plugins]
+    cubos.plugin(defaultsPlugin);
+    cubos.plugin(freeCameraPlugin);
+    cubos.plugin(toolsPlugin);
+    /// [Adding the plugins]
+
+    cubos.resource<ChunkMap>();
+
+    cubos.startupSystem("configure settings").before(settingsTag).call([](Settings& settings) {
+        settings.setString("assets.app.osPath", APP_ASSETS_PATH);
+        settings.setString("assets.builtin.osPath", BUILTIN_ASSETS_PATH);
+        settings.setInteger("renderMeshPool.bucketCount", 2048);
+    });
+
+    cubos.startupSystem("set the palette and environment and spawn the scene")
+        .tagged(assetsTag)
+        .call([](Commands commands, Assets& assets, RenderPalette& palette, RenderEnvironment& environment) {
+            // Create a simple palette with 3 materials (red, green and blue).
+            palette.asset = assets.create(VoxelPalette{{
+                {{0, 1, 0, 1}},
+            }});
+            // Environment
+            environment.ambient = {0.1F, 0.1F, 0.1F};
+            environment.skyGradient[0] = {0.1F, 0.2F, 0.4F};
+            environment.skyGradient[1] = {0.6F, 0.6F, 0.8F};
+            // Spawn base scene
+            commands.spawn(assets.read(SceneAsset)->blueprint);
+        });
+
+    cubos.system("update chunks")
+        .call([](Commands commands, Assets& assets, Query<Entity, const RenderVoxelGrid&, const Position&> chunks,
+                 Query<const Camera&, const Position&> cameras, ChunkMap& chunkMap) {
+            constexpr float chunkSize = 32.0F;
+            constexpr int genRadiusChunks = 16;
+            for (auto [camera, position] : cameras)
+            {
+                if (!camera.active)
+                    return;
+                for (int x = -genRadiusChunks; x < genRadiusChunks; x++)
+                {
+                    for (int z = -genRadiusChunks; z < genRadiusChunks; z++)
+                    {
+                        float posX = float(x + static_cast<int>(position.vec.x / chunkSize)) * chunkSize;
+                        float posZ = float(z + static_cast<int>(position.vec.z / chunkSize)) * chunkSize;
+                        if (!chunkMap.chunkExists.contains(glm::vec2(posX, posZ)))
+                        {
+                            chunkMap.chunkExists[glm::vec2(posX, posZ)] = true;
+                            // Create a perlin noise terrain.
+                            glm::uvec3 gridSize = {static_cast<int>(chunkSize), 32, static_cast<int>(chunkSize)};
+                            auto voxelGrid = VoxelGrid{gridSize};
+                            for (glm::uint gx = 0; gx < gridSize.x; gx++)
+                            {
+                                for (glm::uint gz = 0; gz < gridSize.z; gz++)
+                                {
+                                    auto noise = 0.5F + 0.5F * glm::perlin(0.05F * glm::vec2(float(gx) + posX,
+                                                                                             float(gz) + posZ));
+                                    for (glm::uint gy = 0;
+                                         gy < static_cast<glm::uint>(static_cast<float>(gridSize.y) * noise); gy++)
+                                    {
+                                        voxelGrid.set({gx, gy, gz}, 1);
+                                    }
+                                }
+                            }
+                            auto gridAsset = assets.create(voxelGrid);
+                            // Spawn an entity with a renderable grid component and a identity transform.
+                            commands.create()
+                                .add(RenderVoxelGrid{gridAsset, {-1.0F, 0.0F, -1.0F}})
+                                .add(LocalToWorld{})
+                                .add(Position{{posX, 0.0F, posZ}});
+                        }
+                    }
+                }
+                std::vector<Entity> removedChunks;
+                float minX = float(-genRadiusChunks + static_cast<int>(position.vec.x / chunkSize)) * chunkSize;
+                float maxX = float(genRadiusChunks + static_cast<int>(position.vec.x / chunkSize)) * chunkSize;
+                float minZ = float(-genRadiusChunks + static_cast<int>(position.vec.z / chunkSize)) * chunkSize;
+                float maxZ = float(genRadiusChunks + static_cast<int>(position.vec.z / chunkSize)) * chunkSize;
path: engine/samples/render/profiling/main.cpp
user: login: github-actions[bot]
body: :warning: **readability\-identifier\-naming** :warning:
invalid case style for constexpr variable `` genRadiusChunks ``
```suggestion
                float minX = float(-GenRadiusChunks + static_cast<int>(position.vec.x / chunkSize)) * chunkSize;
                float maxX = float(GenRadiusChunks + static_cast<int>(position.vec.x / chunkSize)) * chunkSize;
                float minZ = float(-GenRadiusChunks + static_cast<int>(position.vec.z / chunkSize)) * chunkSize;
                float maxZ = float(GenRadiusChunks + static_cast<int>(position.vec.z / chunkSize)) * chunkSize;
```
created_at: 2025-04-12T19:54:48Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,139 @@
+#include <unordered_map>
+
+#include <glm/gtc/noise.hpp>
+#include <glm/gtx/hash.hpp>
+
+#include <cubos/core/reflection/external/primitives.hpp>
+
+#include <cubos/engine/assets/plugin.hpp>
+#include <cubos/engine/defaults/plugin.hpp>
+#include <cubos/engine/render/camera/camera.hpp>
+#include <cubos/engine/render/lights/environment.hpp>
+#include <cubos/engine/render/voxels/grid.hpp>
+#include <cubos/engine/render/voxels/palette.hpp>
+#include <cubos/engine/scene/plugin.hpp>
+#include <cubos/engine/settings/plugin.hpp>
+#include <cubos/engine/tools/plugin.hpp>
+#include <cubos/engine/transform/plugin.hpp>
+#include <cubos/engine/utils/free_camera/plugin.hpp>
+#include <cubos/engine/voxels/plugin.hpp>
+#include <cubos/engine/window/plugin.hpp>
+
+using namespace cubos::engine;
+
+static const Asset<Scene> SceneAsset = AnyAsset("9671dc21-e800-4e8b-ab15-e18d9749d233");
+
+struct ChunkMap
+{
+    CUBOS_ANONYMOUS_REFLECT(ChunkMap);
+
+    std::unordered_map<glm::vec2, bool> chunkExists;
+};
+
+int main(int argc, char** argv)
+{
+    Cubos cubos{argc, argv};
+
+    /// [Adding the plugins]
+    cubos.plugin(defaultsPlugin);
+    cubos.plugin(freeCameraPlugin);
+    cubos.plugin(toolsPlugin);
+    /// [Adding the plugins]
+
+    cubos.resource<ChunkMap>();
+
+    cubos.startupSystem("configure settings").before(settingsTag).call([](Settings& settings) {
+        settings.setString("assets.app.osPath", APP_ASSETS_PATH);
+        settings.setString("assets.builtin.osPath", BUILTIN_ASSETS_PATH);
+        settings.setInteger("renderMeshPool.bucketCount", 2048);
+    });
+
+    cubos.startupSystem("set the palette and environment and spawn the scene")
+        .tagged(assetsTag)
+        .call([](Commands commands, Assets& assets, RenderPalette& palette, RenderEnvironment& environment) {
+            // Create a simple palette with 3 materials (red, green and blue).
+            palette.asset = assets.create(VoxelPalette{{
+                {{0, 1, 0, 1}},
+            }});
+            // Environment
+            environment.ambient = {0.1F, 0.1F, 0.1F};
+            environment.skyGradient[0] = {0.1F, 0.2F, 0.4F};
+            environment.skyGradient[1] = {0.6F, 0.6F, 0.8F};
+            // Spawn base scene
+            commands.spawn(assets.read(SceneAsset)->blueprint);
+        });
+
+    cubos.system("update chunks")
+        .call([](Commands commands, Assets& assets, Query<Entity, const RenderVoxelGrid&, const Position&> chunks,
+                 Query<const Camera&, const Position&> cameras, ChunkMap& chunkMap) {
+            constexpr float chunkSize = 32.0F;
+            constexpr int genRadiusChunks = 16;
+            for (auto [camera, position] : cameras)
+            {
+                if (!camera.active)
path: engine/samples/render/profiling/main.cpp
user: login: github-actions[bot]
body: :warning: **readability\-braces\-around\-statements** :warning:
statement should be inside braces
```suggestion
                if (!camera.active) {
```
created_at: 2025-04-12T19:54:49Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,139 @@
+#include <unordered_map>
+
+#include <glm/gtc/noise.hpp>
+#include <glm/gtx/hash.hpp>
+
+#include <cubos/core/reflection/external/primitives.hpp>
+
+#include <cubos/engine/assets/plugin.hpp>
+#include <cubos/engine/defaults/plugin.hpp>
+#include <cubos/engine/render/camera/camera.hpp>
+#include <cubos/engine/render/lights/environment.hpp>
+#include <cubos/engine/render/voxels/grid.hpp>
+#include <cubos/engine/render/voxels/palette.hpp>
+#include <cubos/engine/scene/plugin.hpp>
+#include <cubos/engine/settings/plugin.hpp>
+#include <cubos/engine/tools/plugin.hpp>
+#include <cubos/engine/transform/plugin.hpp>
+#include <cubos/engine/utils/free_camera/plugin.hpp>
+#include <cubos/engine/voxels/plugin.hpp>
+#include <cubos/engine/window/plugin.hpp>
+
+using namespace cubos::engine;
+
+static const Asset<Scene> SceneAsset = AnyAsset("9671dc21-e800-4e8b-ab15-e18d9749d233");
+
+struct ChunkMap
+{
+    CUBOS_ANONYMOUS_REFLECT(ChunkMap);
+
+    std::unordered_map<glm::vec2, bool> chunkExists;
+};
+
+int main(int argc, char** argv)
+{
+    Cubos cubos{argc, argv};
+
+    /// [Adding the plugins]
+    cubos.plugin(defaultsPlugin);
+    cubos.plugin(freeCameraPlugin);
+    cubos.plugin(toolsPlugin);
+    /// [Adding the plugins]
+
+    cubos.resource<ChunkMap>();
+
+    cubos.startupSystem("configure settings").before(settingsTag).call([](Settings& settings) {
+        settings.setString("assets.app.osPath", APP_ASSETS_PATH);
+        settings.setString("assets.builtin.osPath", BUILTIN_ASSETS_PATH);
+        settings.setInteger("renderMeshPool.bucketCount", 2048);
+    });
+
+    cubos.startupSystem("set the palette and environment and spawn the scene")
+        .tagged(assetsTag)
+        .call([](Commands commands, Assets& assets, RenderPalette& palette, RenderEnvironment& environment) {
+            // Create a simple palette with 3 materials (red, green and blue).
+            palette.asset = assets.create(VoxelPalette{{
+                {{0, 1, 0, 1}},
+            }});
+            // Environment
+            environment.ambient = {0.1F, 0.1F, 0.1F};
+            environment.skyGradient[0] = {0.1F, 0.2F, 0.4F};
+            environment.skyGradient[1] = {0.6F, 0.6F, 0.8F};
+            // Spawn base scene
+            commands.spawn(assets.read(SceneAsset)->blueprint);
+        });
+
+    cubos.system("update chunks")
+        .call([](Commands commands, Assets& assets, Query<Entity, const RenderVoxelGrid&, const Position&> chunks,
+                 Query<const Camera&, const Position&> cameras, ChunkMap& chunkMap) {
+            constexpr float chunkSize = 32.0F;
+            constexpr int genRadiusChunks = 16;
+            for (auto [camera, position] : cameras)
+            {
+                if (!camera.active)
+                    return;
+                for (int x = -genRadiusChunks; x < genRadiusChunks; x++)
path: engine/samples/render/profiling/main.cpp
user: login: github-actions[bot]
body: :warning: **readability\-braces\-around\-statements** :warning:
statement should be inside braces
```suggestion
}
                for (int x = -genRadiusChunks; x < genRadiusChunks; x++)
```
created_at: 2025-04-12T19:54:49Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,139 @@
+#include <unordered_map>
+
+#include <glm/gtc/noise.hpp>
+#include <glm/gtx/hash.hpp>
+
+#include <cubos/core/reflection/external/primitives.hpp>
+
+#include <cubos/engine/assets/plugin.hpp>
+#include <cubos/engine/defaults/plugin.hpp>
+#include <cubos/engine/render/camera/camera.hpp>
+#include <cubos/engine/render/lights/environment.hpp>
+#include <cubos/engine/render/voxels/grid.hpp>
+#include <cubos/engine/render/voxels/palette.hpp>
+#include <cubos/engine/scene/plugin.hpp>
+#include <cubos/engine/settings/plugin.hpp>
+#include <cubos/engine/tools/plugin.hpp>
+#include <cubos/engine/transform/plugin.hpp>
+#include <cubos/engine/utils/free_camera/plugin.hpp>
+#include <cubos/engine/voxels/plugin.hpp>
+#include <cubos/engine/window/plugin.hpp>
+
+using namespace cubos::engine;
+
+static const Asset<Scene> SceneAsset = AnyAsset("9671dc21-e800-4e8b-ab15-e18d9749d233");
+
+struct ChunkMap
+{
+    CUBOS_ANONYMOUS_REFLECT(ChunkMap);
+
+    std::unordered_map<glm::vec2, bool> chunkExists;
+};
+
+int main(int argc, char** argv)
+{
+    Cubos cubos{argc, argv};
+
+    /// [Adding the plugins]
+    cubos.plugin(defaultsPlugin);
+    cubos.plugin(freeCameraPlugin);
+    cubos.plugin(toolsPlugin);
+    /// [Adding the plugins]
+
+    cubos.resource<ChunkMap>();
+
+    cubos.startupSystem("configure settings").before(settingsTag).call([](Settings& settings) {
+        settings.setString("assets.app.osPath", APP_ASSETS_PATH);
+        settings.setString("assets.builtin.osPath", BUILTIN_ASSETS_PATH);
+        settings.setInteger("renderMeshPool.bucketCount", 2048);
+    });
+
+    cubos.startupSystem("set the palette and environment and spawn the scene")
+        .tagged(assetsTag)
+        .call([](Commands commands, Assets& assets, RenderPalette& palette, RenderEnvironment& environment) {
+            // Create a simple palette with 3 materials (red, green and blue).
+            palette.asset = assets.create(VoxelPalette{{
+                {{0, 1, 0, 1}},
+            }});
+            // Environment
+            environment.ambient = {0.1F, 0.1F, 0.1F};
+            environment.skyGradient[0] = {0.1F, 0.2F, 0.4F};
+            environment.skyGradient[1] = {0.6F, 0.6F, 0.8F};
+            // Spawn base scene
+            commands.spawn(assets.read(SceneAsset)->blueprint);
+        });
+
+    cubos.system("update chunks")
+        .call([](Commands commands, Assets& assets, Query<Entity, const RenderVoxelGrid&, const Position&> chunks,
+                 Query<const Camera&, const Position&> cameras, ChunkMap& chunkMap) {
+            constexpr float chunkSize = 32.0F;
+            constexpr int genRadiusChunks = 16;
+            for (auto [camera, position] : cameras)
+            {
+                if (!camera.active)
+                    return;
+                for (int x = -genRadiusChunks; x < genRadiusChunks; x++)
+                {
+                    for (int z = -genRadiusChunks; z < genRadiusChunks; z++)
+                    {
+                        float posX = float(x + static_cast<int>(position.vec.x / chunkSize)) * chunkSize;
+                        float posZ = float(z + static_cast<int>(position.vec.z / chunkSize)) * chunkSize;
+                        if (!chunkMap.chunkExists.contains(glm::vec2(posX, posZ)))
+                        {
+                            chunkMap.chunkExists[glm::vec2(posX, posZ)] = true;
+                            // Create a perlin noise terrain.
+                            glm::uvec3 gridSize = {static_cast<int>(chunkSize), 32, static_cast<int>(chunkSize)};
+                            auto voxelGrid = VoxelGrid{gridSize};
+                            for (glm::uint gx = 0; gx < gridSize.x; gx++)
+                            {
+                                for (glm::uint gz = 0; gz < gridSize.z; gz++)
+                                {
+                                    auto noise = 0.5F + 0.5F * glm::perlin(0.05F * glm::vec2(float(gx) + posX,
+                                                                                             float(gz) + posZ));
+                                    for (glm::uint gy = 0;
+                                         gy < static_cast<glm::uint>(static_cast<float>(gridSize.y) * noise); gy++)
+                                    {
+                                        voxelGrid.set({gx, gy, gz}, 1);
+                                    }
+                                }
+                            }
+                            auto gridAsset = assets.create(voxelGrid);
+                            // Spawn an entity with a renderable grid component and a identity transform.
+                            commands.create()
+                                .add(RenderVoxelGrid{gridAsset, {-1.0F, 0.0F, -1.0F}})
+                                .add(LocalToWorld{})
+                                .add(Position{{posX, 0.0F, posZ}});
+                        }
+                    }
+                }
+                std::vector<Entity> removedChunks;
+                float minX = float(-genRadiusChunks + static_cast<int>(position.vec.x / chunkSize)) * chunkSize;
+                float maxX = float(genRadiusChunks + static_cast<int>(position.vec.x / chunkSize)) * chunkSize;
+                float minZ = float(-genRadiusChunks + static_cast<int>(position.vec.z / chunkSize)) * chunkSize;
+                float maxZ = float(genRadiusChunks + static_cast<int>(position.vec.z / chunkSize)) * chunkSize;
+                for (auto [entity, grid, gridPosition] : chunks)
+                {
+                    if (gridPosition.vec.x < minX || gridPosition.vec.x > maxX || gridPosition.vec.z < minZ ||
+                        gridPosition.vec.z > maxZ)
+                    {
+                        removedChunks.push_back(entity);
+                        chunkMap.chunkExists.erase(glm::vec2(gridPosition.vec.x, gridPosition.vec.z));
+                    }
+                }
+                for (auto& chunkEntity : removedChunks)
+                {
+                    commands.destroy(chunkEntity);
+                }
+            }
+        });
+
+    cubos.system("move camera").call([](Query<const Camera&, Position&> cameras, DeltaTime& dt) {
+        for (auto [camera, position] : cameras)
+        {
+            if (!camera.active)
path: engine/samples/render/profiling/main.cpp
user: login: github-actions[bot]
body: :warning: **readability\-braces\-around\-statements** :warning:
statement should be inside braces
```suggestion
            if (!camera.active) {
```
created_at: 2025-04-12T19:55:00Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,139 @@
+#include <unordered_map>
+
+#include <glm/gtc/noise.hpp>
+#include <glm/gtx/hash.hpp>
+
+#include <cubos/core/reflection/external/primitives.hpp>
+
+#include <cubos/engine/assets/plugin.hpp>
+#include <cubos/engine/defaults/plugin.hpp>
+#include <cubos/engine/render/camera/camera.hpp>
+#include <cubos/engine/render/lights/environment.hpp>
+#include <cubos/engine/render/voxels/grid.hpp>
+#include <cubos/engine/render/voxels/palette.hpp>
+#include <cubos/engine/scene/plugin.hpp>
+#include <cubos/engine/settings/plugin.hpp>
+#include <cubos/engine/tools/plugin.hpp>
+#include <cubos/engine/transform/plugin.hpp>
+#include <cubos/engine/utils/free_camera/plugin.hpp>
+#include <cubos/engine/voxels/plugin.hpp>
+#include <cubos/engine/window/plugin.hpp>
+
+using namespace cubos::engine;
+
+static const Asset<Scene> SceneAsset = AnyAsset("9671dc21-e800-4e8b-ab15-e18d9749d233");
+
+struct ChunkMap
+{
+    CUBOS_ANONYMOUS_REFLECT(ChunkMap);
+
+    std::unordered_map<glm::vec2, bool> chunkExists;
+};
+
+int main(int argc, char** argv)
+{
+    Cubos cubos{argc, argv};
+
+    /// [Adding the plugins]
+    cubos.plugin(defaultsPlugin);
+    cubos.plugin(freeCameraPlugin);
+    cubos.plugin(toolsPlugin);
+    /// [Adding the plugins]
+
+    cubos.resource<ChunkMap>();
+
+    cubos.startupSystem("configure settings").before(settingsTag).call([](Settings& settings) {
+        settings.setString("assets.app.osPath", APP_ASSETS_PATH);
+        settings.setString("assets.builtin.osPath", BUILTIN_ASSETS_PATH);
+        settings.setInteger("renderMeshPool.bucketCount", 2048);
+    });
+
+    cubos.startupSystem("set the palette and environment and spawn the scene")
+        .tagged(assetsTag)
+        .call([](Commands commands, Assets& assets, RenderPalette& palette, RenderEnvironment& environment) {
+            // Create a simple palette with 3 materials (red, green and blue).
+            palette.asset = assets.create(VoxelPalette{{
+                {{0, 1, 0, 1}},
+            }});
+            // Environment
+            environment.ambient = {0.1F, 0.1F, 0.1F};
+            environment.skyGradient[0] = {0.1F, 0.2F, 0.4F};
+            environment.skyGradient[1] = {0.6F, 0.6F, 0.8F};
+            // Spawn base scene
+            commands.spawn(assets.read(SceneAsset)->blueprint);
+        });
+
+    cubos.system("update chunks")
+        .call([](Commands commands, Assets& assets, Query<Entity, const RenderVoxelGrid&, const Position&> chunks,
+                 Query<const Camera&, const Position&> cameras, ChunkMap& chunkMap) {
+            constexpr float chunkSize = 32.0F;
+            constexpr int genRadiusChunks = 16;
+            for (auto [camera, position] : cameras)
+            {
+                if (!camera.active)
+                    return;
+                for (int x = -genRadiusChunks; x < genRadiusChunks; x++)
+                {
+                    for (int z = -genRadiusChunks; z < genRadiusChunks; z++)
+                    {
+                        float posX = float(x + static_cast<int>(position.vec.x / chunkSize)) * chunkSize;
+                        float posZ = float(z + static_cast<int>(position.vec.z / chunkSize)) * chunkSize;
+                        if (!chunkMap.chunkExists.contains(glm::vec2(posX, posZ)))
+                        {
+                            chunkMap.chunkExists[glm::vec2(posX, posZ)] = true;
+                            // Create a perlin noise terrain.
+                            glm::uvec3 gridSize = {static_cast<int>(chunkSize), 32, static_cast<int>(chunkSize)};
+                            auto voxelGrid = VoxelGrid{gridSize};
+                            for (glm::uint gx = 0; gx < gridSize.x; gx++)
+                            {
+                                for (glm::uint gz = 0; gz < gridSize.z; gz++)
+                                {
+                                    auto noise = 0.5F + 0.5F * glm::perlin(0.05F * glm::vec2(float(gx) + posX,
+                                                                                             float(gz) + posZ));
+                                    for (glm::uint gy = 0;
+                                         gy < static_cast<glm::uint>(static_cast<float>(gridSize.y) * noise); gy++)
+                                    {
+                                        voxelGrid.set({gx, gy, gz}, 1);
+                                    }
+                                }
+                            }
+                            auto gridAsset = assets.create(voxelGrid);
+                            // Spawn an entity with a renderable grid component and a identity transform.
+                            commands.create()
+                                .add(RenderVoxelGrid{gridAsset, {-1.0F, 0.0F, -1.0F}})
+                                .add(LocalToWorld{})
+                                .add(Position{{posX, 0.0F, posZ}});
+                        }
+                    }
+                }
+                std::vector<Entity> removedChunks;
+                float minX = float(-genRadiusChunks + static_cast<int>(position.vec.x / chunkSize)) * chunkSize;
+                float maxX = float(genRadiusChunks + static_cast<int>(position.vec.x / chunkSize)) * chunkSize;
+                float minZ = float(-genRadiusChunks + static_cast<int>(position.vec.z / chunkSize)) * chunkSize;
+                float maxZ = float(genRadiusChunks + static_cast<int>(position.vec.z / chunkSize)) * chunkSize;
+                for (auto [entity, grid, gridPosition] : chunks)
+                {
+                    if (gridPosition.vec.x < minX || gridPosition.vec.x > maxX || gridPosition.vec.z < minZ ||
+                        gridPosition.vec.z > maxZ)
+                    {
+                        removedChunks.push_back(entity);
+                        chunkMap.chunkExists.erase(glm::vec2(gridPosition.vec.x, gridPosition.vec.z));
+                    }
+                }
+                for (auto& chunkEntity : removedChunks)
+                {
+                    commands.destroy(chunkEntity);
+                }
+            }
+        });
+
+    cubos.system("move camera").call([](Query<const Camera&, Position&> cameras, DeltaTime& dt) {
+        for (auto [camera, position] : cameras)
+        {
+            if (!camera.active)
+                return;
+            position.vec += glm::vec3(0.0F, 0.0F, -30.0F * dt.value());
path: engine/samples/render/profiling/main.cpp
user: login: github-actions[bot]
body: :warning: **readability\-braces\-around\-statements** :warning:
statement should be inside braces
```suggestion
}
            position.vec += glm::vec3(0.0F, 0.0F, -30.0F * dt.value());
```
created_at: 2025-04-12T19:55:00Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,143 @@
+#include <unordered_map>
+
+#include <glm/gtc/noise.hpp>
+#include <glm/gtx/hash.hpp>
+
+#include <cubos/core/reflection/external/primitives.hpp>
+
+#include <cubos/engine/assets/plugin.hpp>
+#include <cubos/engine/defaults/plugin.hpp>
+#include <cubos/engine/render/camera/camera.hpp>
+#include <cubos/engine/render/lights/environment.hpp>
+#include <cubos/engine/render/voxels/grid.hpp>
+#include <cubos/engine/render/voxels/palette.hpp>
+#include <cubos/engine/scene/plugin.hpp>
+#include <cubos/engine/settings/plugin.hpp>
+#include <cubos/engine/tools/plugin.hpp>
+#include <cubos/engine/transform/plugin.hpp>
+#include <cubos/engine/utils/free_camera/plugin.hpp>
+#include <cubos/engine/voxels/plugin.hpp>
+#include <cubos/engine/window/plugin.hpp>
+
+using namespace cubos::engine;
+
+static const Asset<Scene> SceneAsset = AnyAsset("9671dc21-e800-4e8b-ab15-e18d9749d233");
+
+struct ChunkMap
+{
+    CUBOS_ANONYMOUS_REFLECT(ChunkMap);
+
+    std::unordered_map<glm::vec2, bool> chunkExists;
+};
+
+int main(int argc, char** argv)
+{
+    Cubos cubos{argc, argv};
+
+    /// [Adding the plugins]
+    cubos.plugin(defaultsPlugin);
+    cubos.plugin(freeCameraPlugin);
+    cubos.plugin(toolsPlugin);
+    /// [Adding the plugins]
+
+    cubos.resource<ChunkMap>();
+
+    cubos.startupSystem("configure settings").before(settingsTag).call([](Settings& settings) {
+        settings.setString("assets.app.osPath", APP_ASSETS_PATH);
+        settings.setString("assets.builtin.osPath", BUILTIN_ASSETS_PATH);
+        settings.setInteger("renderMeshPool.bucketCount", 2048);
+    });
+
+    cubos.startupSystem("set the palette and environment and spawn the scene")
+        .tagged(assetsTag)
+        .call([](Commands commands, Assets& assets, RenderPalette& palette, RenderEnvironment& environment) {
+            // Create a simple palette with 3 materials (red, green and blue).
+            palette.asset = assets.create(VoxelPalette{{
+                {{0, 1, 0, 1}},
+            }});
+            // Environment
+            environment.ambient = {0.1F, 0.1F, 0.1F};
+            environment.skyGradient[0] = {0.1F, 0.2F, 0.4F};
+            environment.skyGradient[1] = {0.6F, 0.6F, 0.8F};
+            // Spawn base scene
+            commands.spawn(assets.read(SceneAsset)->blueprint);
+        });
+
+    cubos.system("update chunks")
+        .call([](Commands commands, Assets& assets, Query<Entity, const RenderVoxelGrid&, const Position&> chunks,
+                 Query<const Camera&, const Position&> cameras, ChunkMap& chunkMap) {
+            constexpr float ChunkSize = 32.0F;
+            constexpr int GenRadiusChunks = 16;
+            for (auto [camera, position] : cameras)
+            {
+                if (!camera.active)
+                {
+                    return;
+                }
+                for (int x = -GenRadiusChunks; x < GenRadiusChunks; x++)
+                {
+                    for (int z = -GenRadiusChunks; z < GenRadiusChunks; z++)
+                    {
+                        float posX = float(x + static_cast<int>(position.vec.x / ChunkSize)) * ChunkSize;
+                        float posZ = float(z + static_cast<int>(position.vec.z / ChunkSize)) * ChunkSize;
+                        if (!chunkMap.chunkExists.contains(glm::vec2(posX, posZ)))
+                        {
+                            chunkMap.chunkExists[glm::vec2(posX, posZ)] = true;
+                            // Create a perlin noise terrain.
+                            glm::uvec3 gridSize = {static_cast<int>(ChunkSize), 32, static_cast<int>(ChunkSize)};
+                            auto voxelGrid = VoxelGrid{gridSize};
+                            for (glm::uint gx = 0; gx < gridSize.x; gx++)
+                            {
+                                for (glm::uint gz = 0; gz < gridSize.z; gz++)
+                                {
+                                    auto noise = 0.5F + 0.5F * glm::perlin(0.05F * glm::vec2(float(gx) + posX,
+                                                                                             float(gz) + posZ));
+                                    for (glm::uint gy = 0;
+                                         gy < static_cast<glm::uint>(static_cast<float>(gridSize.y) * noise); gy++)
+                                    {
+                                        voxelGrid.set({gx, gy, gz}, 1);
+                                    }
+                                }
+                            }
+                            auto gridAsset = assets.create(voxelGrid);
+                            // Spawn an entity with a renderable grid component and a identity transform.
+                            commands.create()
+                                .add(RenderVoxelGrid{gridAsset, {-1.0F, 0.0F, -1.0F}})
+                                .add(LocalToWorld{})
+                                .add(Position{{posX, 0.0F, posZ}});
+                        }
+                    }
+                }
+                std::vector<Entity> removedChunks;
+                float minX = float(-GenRadiusChunks + static_cast<int>(position.vec.x / ChunkSize)) * ChunkSize;
+                float maxX = float(GenRadiusChunks + static_cast<int>(position.vec.x / ChunkSize)) * ChunkSize;
+                float minZ = float(-GenRadiusChunks + static_cast<int>(position.vec.z / ChunkSize)) * ChunkSize;
+                float maxZ = float(GenRadiusChunks + static_cast<int>(position.vec.z / ChunkSize)) * ChunkSize;
+                for (auto [entity, grid, gridPosition] : chunks)
+                {
+                    if (gridPosition.vec.x < minX || gridPosition.vec.x > maxX || gridPosition.vec.z < minZ ||
+                        gridPosition.vec.z > maxZ)
+                    {
+                        removedChunks.push_back(entity);
+                        chunkMap.chunkExists.erase(glm::vec2(gridPosition.vec.x, gridPosition.vec.z));
+                    }
+                }
+                for (auto& chunkEntity : removedChunks)
+                {
+                    commands.destroy(chunkEntity);
+                }
+            }
+        });
+
+    cubos.system("move camera").call([](Query<const Camera&, Position&> cameras, DeltaTime& dt) {
+        for (auto [camera, position] : cameras)
+        {
+            if (!camera.active)
+            {
+                return;
path: engine/samples/render/profiling/main.cpp
user: login: github-actions[bot]
body: :warning: **readability\-braces\-around\-statements** :warning:
statement should be inside braces
```suggestion
}
            position.vec += glm::vec3(0.0F, 0.0F, -30.0F * dt.value());
```
created_at: 2025-04-12T21:06:02Z
author_association: CONTRIBUTOR
path: engine/samples/render/profiling/assets/main.cubos
user: login: RiscadoA
body: Since you added a new scene here in this PR, I will rebase my new scene format PR on yours, so that you can merge this first.
created_at: 2025-04-14T07:17:39Z
author_association: MEMBER

PR comments:
user: login: github-actions[bot]
created_at: 2025-04-12T19:21:10Z
body: [PR Preview Action](https://github.com/rossjrw/pr-preview-action) v1.6.1
:---:
| <p></p> :rocket: View preview at <br> https://GameDevTecnico.github.io/cubos/preview/pr-1488/ <br><br>
| <h6>Built to branch [`gh-pages`](https://github.com/GameDevTecnico/cubos/tree/gh-pages) at 2025-04-12 19:20 UTC. <br> Preview will be ready when the [GitHub Pages deployment](https://github.com/GameDevTecnico/cubos/deployments) is complete. <br><br> </h6>
<!-- Sticky Pull Request Commentpr-preview -->
author_association: CONTRIBUTOR
user: login: codecov[bot]
created_at: 2025-04-12T19:37:13Z
body: ## [Codecov](https://app.codecov.io/gh/GameDevTecnico/cubos/pull/1488?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GameDevTecnico) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 52.89%. Comparing base [(`14e0880`)](https://app.codecov.io/gh/GameDevTecnico/cubos/commit/14e08801deb098e3b639ef2350ab19638b92eb79?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GameDevTecnico) to head [(`2139ff2`)](https://app.codecov.io/gh/GameDevTecnico/cubos/commit/2139ff29b7c4665ec85a67126b7294702adea7b8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GameDevTecnico).
> Report is 1 commits behind head on main.

<details><summary>Additional details and impacted files</summary>


```diff
@@           Coverage Diff           @@
##             main    #1488   +/-   ##
=======================================
  Coverage   52.89%   52.89%           
=======================================
  Files         469      469           
  Lines       26177    26177           
  Branches     2434     2434           
=======================================
+ Hits        13846    13847    +1     
+ Misses      12331    12330    -1     
```

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/GameDevTecnico/cubos/pull/1488?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GameDevTecnico).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GameDevTecnico).

<details><summary> :rocket: New features to boost your workflow: </summary>

- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
author_association: NONE