Remove X-flip from image: map content reads normally
The user wants the original tile content (map) to be readable normally, not X-mirrored. The X-swap arrangement (canvasX = -perp + ...) places east tiles on the right of the screen, so X coordinates read naturally left to right when scanning the corridor. Combined state: - Map content (image): drawn with normal orientation (no X-flip) - Arrangement: east on right, west on left (X-swap) - Labels: drawn in normal orientation in the corners - Y-swap: north tiles (lng=+12) at canvas top -> screen top
This commit is contained in:
1 parent
00e59983bf
commit
bac0397140
1 file changed
+6
-3
Vendored
+6
-3
@@ -349,9 +349,12 @@ function drawTileAt(lng, perp, dx, dz, centerTileX, centerTileY) {
|
|||||||
// the corridor orientation (east tiles have their image east
|
// the corridor orientation (east tiles have their image east
|
||||||
// on the left of the drawn area, west tiles on the right).
|
// on the left of the drawn area, west tiles on the right).
|
||||||
// Labels are drawn separately in normal orientation, so the
|
// Labels are drawn separately in normal orientation, so the
|
||||||
// X-coordinates labels read normally.
|
// Draw image with normal orientation (no X-flip). The
|
||||||
groundCtx.drawImage(img, canvasX + GROUND_TILE_SIZE, canvasY,
|
// X-swap arrangement (canvasX = -perp + ...) already places
|
||||||
-GROUND_TILE_SIZE, GROUND_TILE_SIZE);
|
// east tiles on the right of the screen, so the X coordinates
|
||||||
|
// read naturally left to right when scanning the corridor.
|
||||||
|
groundCtx.drawImage(img, canvasX, canvasY,
|
||||||
|
GROUND_TILE_SIZE, GROUND_TILE_SIZE);
|
||||||
groundLoadedTiles[tileX + '_' + tileY] = true;
|
groundLoadedTiles[tileX + '_' + tileY] = true;
|
||||||
|
|
||||||
// Thin border so the user can see where one tile ends and the
|
// Thin border so the user can see where one tile ends and the
|
||||||
|
|||||||
Reference in new issue
Block a user