implement stats.min.js, improve fps

This commit is contained in:
LabyStudio
2022-02-01 08:30:51 +01:00
parent ac850a5101
commit ed49c9f776
7 changed files with 56 additions and 25 deletions
@@ -26,6 +26,10 @@ window.ChunkSection = class {
this.dirty = false;
this.group.clear();
// Start drawing chunk section
let tessellator = renderer.blockRenderer.tessellator;
tessellator.startDrawing();
for (let x = 0; x < ChunkSection.SIZE; x++) {
for (let y = 0; y < ChunkSection.SIZE; y++) {
for (let z = 0; z < ChunkSection.SIZE; z++) {
@@ -42,6 +46,9 @@ window.ChunkSection = class {
}
}
}
// Draw chunk section
tessellator.draw(this.group);
}
getBlockAt(x, y, z) {