diff --git a/vendor/clouds3d.js b/vendor/clouds3d.js index 546b8c1..60b92b2 100644 --- a/vendor/clouds3d.js +++ b/vendor/clouds3d.js @@ -346,11 +346,12 @@ function drawTileAt(lng, perp, dx, dz, centerTileX, centerTileY) { // (canvasX + 256, canvasY + 256). After this, image north // (high lat) is at canvas bottom and image south at canvas // top; image east at canvas right, image west at canvas left. - // Flip image only on the Y axis (NS mirror). Image top - // (north) -> canvas bottom, image bottom (south) -> canvas - // top. X axis (EW) is preserved. - groundCtx.drawImage(img, canvasX, canvasY + GROUND_TILE_SIZE, - GROUND_TILE_SIZE, -GROUND_TILE_SIZE); + // Flip image 180° (both X and Y). Image top (north) -> canvas + // bottom, image bottom (south) -> canvas top, image left + // (west) -> canvas right, image right (east) -> canvas left. + // Labels N/S already match the Y-flipped orientation. + groundCtx.drawImage(img, canvasX + GROUND_TILE_SIZE, canvasY + GROUND_TILE_SIZE, + -GROUND_TILE_SIZE, -GROUND_TILE_SIZE); groundLoadedTiles[tileX + '_' + tileY] = true; // Debug labels: 'N' at the image's north edge (top of canvas