From 29924d07b0bfbb0d3183496ea44b47a0140422cf Mon Sep 17 00:00:00 2001 From: Richard Zink Date: Thu, 8 Oct 2026 08:15:49 +0200 Subject: [PATCH] Mirror O/W arrangement: east tiles to canvas right, west to left User wants only the O/W arrangement mirrored (image X-flip stays as it was). The drawing formula for canvasX now uses (-perp + halfPerp + 0.5) instead of (perp + halfPerp + 0.5), so tiles with perp<0 (world east, dx>0) land at large canvasX (right side of canvas). Y axis (forward direction in N flight) stays unchanged. --- vendor/clouds3d.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/clouds3d.js b/vendor/clouds3d.js index 9e620c7..cc9f213 100644 --- a/vendor/clouds3d.js +++ b/vendor/clouds3d.js @@ -335,7 +335,7 @@ function drawTileAt(lng, perp, dx, dz, centerTileX, centerTileY) { // N flight) lands at small canvasY (= screen top after flip). // For perp axis (X): keep the natural sign so world east (dx>0) // ends up at canvasX > halfPerp area (right side of canvas). - var canvasX = (perp + halfPerp + 0.5) * GROUND_TILE_SIZE; + var canvasX = (-perp + halfPerp + 0.5) * GROUND_TILE_SIZE; var canvasY = (lng + halfLong + 0.5) * GROUND_TILE_SIZE; if (canvasX < 0 || canvasX >= groundCanvas.width || canvasY < 0 || canvasY >= groundCanvas.height) { return Promise.resolve(false);