From eeb2e3e5f682cb197e7fabbfdf4d08fae5416b59 Mon Sep 17 00:00:00 2001 From: Richard Zink Date: Thu, 8 Oct 2026 07:02:01 +0200 Subject: [PATCH] Revert canvas axis swap, try original drawing formula User reports NS axis mirror with current swap. Try the original formula (canvasY = (lng + halfLong + 0.5)*TILE_SIZE) without swapping. UNPACK_FLIP_Y_WEBGL stays true so text still reads right-side up; just see if the user's visual expectations match this simpler arrangement. --- vendor/clouds3d.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/vendor/clouds3d.js b/vendor/clouds3d.js index 02e337d..b755466 100644 --- a/vendor/clouds3d.js +++ b/vendor/clouds3d.js @@ -328,13 +328,8 @@ function drawTileAt(lng, perp, dx, dz, centerTileX, centerTileY) { // (vertical) and perp along canvas X (horizontal). This way the // corridor's long axis (flight direction +Z) appears as a vertical // strip on canvas, matching the way depth maps on screen. - // With UNPACK_FLIP_Y_WEBGL=true, canvas top -> texture V=1 (screen top). - // We want lng=+12 (corridor north/front, ahead of camera) at screen top. - // So canvasY is inverted: small Y = high lng (north). - // Same idea for perp: world east (dx > 0) should be on screen right, - // so canvasX is also inverted: large X = perp < 0 = dx > 0 = east. - var canvasX = (-perp + halfPerp + 0.5) * GROUND_TILE_SIZE; - var canvasY = (-lng + halfLong + 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); }