Render regions, disabled by default
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user