1
0
Fork 0

[client] Fix chunk loading at high zooms

This commit is contained in:
Starbeamrainbowlabs 2017-06-15 17:25:11 +01:00
parent 4ff91f700b
commit ce1f8545a6
1 changed files with 2 additions and 2 deletions

View File

@ -50,8 +50,8 @@ class ChunkCache
let chunkArea = new Rectangle(
Math.floor(visibleArea.x / chunkSize) * chunkSize,
Math.floor(visibleArea.y / chunkSize) * chunkSize,
(Math.ceil((visibleArea.x + (visibleArea.width)) / chunkSize) * chunkSize),
(Math.ceil((visibleArea.y + (visibleArea.height)) / chunkSize) * chunkSize)
(Math.ceil((Math.abs(visibleArea.x) + (visibleArea.width)) / chunkSize) * chunkSize),
(Math.ceil((Math.abs(visibleArea.y) + (visibleArea.height)) / chunkSize) * chunkSize)
);