use bulk drawing

This commit is contained in:
LabyStudio
2022-01-31 20:24:53 +01:00
parent 293a6d9553
commit af525c88fa
3 changed files with 16 additions and 3 deletions
@@ -27,6 +27,7 @@ window.ChunkSection = class {
this.dirty = false;
this.group.clear();
renderer.blockRenderer.tessellator.startDrawing();
for (let x = 0; x < ChunkSection.SIZE; x++) {
for (let y = 0; y < ChunkSection.SIZE; y++) {
@@ -43,6 +44,8 @@ window.ChunkSection = class {
}
}
}
renderer.blockRenderer.tessellator.draw(this.group);
}
getBlockAt(x, y, z) {