From c2d6fd38bab172d7bf9b95c93e717643e892abf4 Mon Sep 17 00:00:00 2001 From: Richard Zink Date: Wed, 7 Oct 2026 21:34:51 +0200 Subject: [PATCH] Fix canvas dimensions for swapped corridor axes After swapping axes so lng runs along canvas Y (corridor long axis), canvas height was still GROUND_CORRIDOR_PERP * 256 = 1280 (only 5 tiles tall). The 25-tile-long corridor was drawn off-canvas, so only the back 5 tiles (lng -12..-7) were visible. That made new tiles 'disappear' off the right side and the build appear 90 deg off from flight. Set canvas height to corridor long (25 tiles = 6400 px) and canvas width to perp (5 tiles = 1280 px). Now the full corridor fits on canvas and the visual depth direction matches the camera's flight direction along canvas Y. --- vendor/clouds3d.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/clouds3d.js b/vendor/clouds3d.js index 3952bf0..c779ff5 100644 --- a/vendor/clouds3d.js +++ b/vendor/clouds3d.js @@ -405,8 +405,8 @@ function initGroundSystem(glCtx) { if (groundCanvas) return; // already initialised groundGl = glCtx; groundCanvas = document.createElement('canvas'); - groundCanvas.width = GROUND_TILE_SIZE * GROUND_CORRIDOR_LONG; - groundCanvas.height = GROUND_TILE_SIZE * GROUND_CORRIDOR_PERP; + groundCanvas.width = GROUND_TILE_SIZE * GROUND_CORRIDOR_PERP; + groundCanvas.height = GROUND_TILE_SIZE * GROUND_CORRIDOR_LONG; groundCtx = groundCanvas.getContext('2d'); // Pre-fill with fog colour so partially-loaded mosaic still // shows the right base colour