feat: Improve stone layer visibility and rendering

This commit is contained in:
Kacper Kostka (aider)
2025-04-05 15:40:27 +02:00
parent 15fb106246
commit 883c3d9a08
3 changed files with 33 additions and 7 deletions

View File

@@ -47,6 +47,16 @@ window.onload = function() {
// Initialize the first chunk and generate terrain around it
getOrCreateChunk(0, 0);
// Explicitly create and mark the stone layer as dirty
for (let dx = -5; dx <= 5; dx++) {
const chunkX = dx;
const chunkY = 1; // Stone layer
const key = getChunkKey(chunkX, chunkY);
getOrCreateChunk(chunkX, chunkY);
dirtyChunks.add(key);
}
generateChunksAroundPlayer();
// Start the simulation loop