refactor: Optimize terrain rendering and zooming performance
This commit is contained in:
@@ -182,6 +182,7 @@ function isWater(x, y) {
|
||||
// Get terrain type at a position
|
||||
function getTerrainType(x, y) {
|
||||
// Convert world coordinates to terrain grid coordinates
|
||||
// Use consistent rounding to prevent shaking
|
||||
const gridX = Math.floor((x + 2000) / 10);
|
||||
const gridY = Math.floor((y + 2000) / 10);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user