From f0641bd4bddf4eaf4a119cde055edc55b1fc8fcc Mon Sep 17 00:00:00 2001 From: Richard Zink Date: Thu, 8 Oct 2026 10:26:09 +0200 Subject: [PATCH] Activate X-flip on image: negative width in drawImage --- vendor/clouds3d.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vendor/clouds3d.js b/vendor/clouds3d.js index 2ccafc4..3d14551 100644 --- a/vendor/clouds3d.js +++ b/vendor/clouds3d.js @@ -350,9 +350,12 @@ function drawTileAt(lng, perp, dx, dz, centerTileX, centerTileY) { // the corridor orientation (east tiles have their image east // on the left of the drawn area, west tiles on the right). // Labels are drawn separately in normal orientation, so the - // No X-flip on the image. Map content reads normally. - groundCtx.drawImage(img, canvasX, canvasY, - GROUND_TILE_SIZE, GROUND_TILE_SIZE); + // X-flip activated: draw with negative width to mirror + // horizontally. The image is anchored at the right edge + // (canvasX + TILE_SIZE) and extends leftward, producing a + // horizontally mirrored image. + groundCtx.drawImage(img, canvasX + GROUND_TILE_SIZE, canvasY, + -GROUND_TILE_SIZE, GROUND_TILE_SIZE); groundLoadedTiles[tileX + '_' + tileY] = true; // Thin border so the user can see where one tile ends and the