fix: Optimize player spawn, camera zoom, and performance to reduce lag
This commit is contained in:
@@ -9,8 +9,8 @@ function render() {
|
||||
// Draw animated sky background
|
||||
renderSky();
|
||||
|
||||
// Get visible chunks
|
||||
const visibleChunks = getVisibleChunks();
|
||||
// Get visible chunks - limit the number of chunks processed per frame
|
||||
const visibleChunks = getVisibleChunks().slice(0, 20);
|
||||
|
||||
// Render each visible chunk
|
||||
for (const { chunkX, chunkY, isVisible } of visibleChunks) {
|
||||
|
||||
Reference in New Issue
Block a user