diff --git a/vendor/clouds3d.js b/vendor/clouds3d.js index 7df2f70..2e3ec5a 100644 --- a/vendor/clouds3d.js +++ b/vendor/clouds3d.js @@ -337,7 +337,7 @@ function drawTileAt(lng, perp, dx, dz, centerTileX, centerTileY) { // UNPACK_FLIP_Y_WEBGL=true inverts V: canvas top -> texture V=1 (top). // For lng axis (Y): invert canvasY so lng=+12 (corridor front in // N flight) lands at small canvasY (= screen top after flip). - // For perp axis (X): keep the natural sign so world east (dx>0) + // === X-SWAP BUILD v3 === // X-swap: east (perp=-2) -> canvasX 1152 (right) // ends up at canvasX > halfPerp area (right side of canvas). var canvasX = (-perp + halfPerp + 0.5) * GROUND_TILE_SIZE; var canvasY = (lng + halfLong + 0.5) * GROUND_TILE_SIZE; @@ -495,7 +495,8 @@ function initGroundSystem(glCtx) { if (groundCanvas) return; // already initialised groundGl = glCtx; groundCanvas = document.createElement('canvas'); - groundCanvas.width = GROUND_TILE_SIZE * GROUND_CORRIDOR_PERP; + // Wider canvas so all X labels (at canvasX + 244) are visible + groundCanvas.width = GROUND_TILE_SIZE * GROUND_CORRIDOR_PERP + 2 * GROUND_TILE_SIZE; groundCanvas.height = GROUND_TILE_SIZE * GROUND_CORRIDOR_LONG; groundCtx = groundCanvas.getContext('2d'); // Pre-fill with fog colour so partially-loaded mosaic still