Render regions, disabled by default

This commit is contained in:
2026-11-07 19:35:42 -03:00
parent 206cd38f26
commit c639d1231b
8 changed files with 424 additions and 36 deletions
+5 -1
View File
@@ -154,9 +154,13 @@ export class DebugOverlay {
for (const section of chunk.sections) {
const meshes = Object.values(section.meshes);
if (meshes.length > 0) meshed += 1;
for (const mesh of meshes) bytes += mesh.vertex_buffer.size + (mesh.index_buffer?.size ?? 0);
for (const mesh of meshes) bytes += (mesh.vertex_buffer?.size ?? 0) + (mesh.index_buffer?.size ?? 0);
}
}
// solid and cutout quads are in their regions' buffers
for (const region of client.level.regions.values()) {
for (const { buffer } of Object.values(region.layers)) bytes += buffer?.size ?? 0;
}
this.#chunk_stats = { meshed, bytes };
return this.#chunk_stats;
}