Remove all X mirrors: natural order, no flip
Final state per user request (KEIN X-Swap, KEIN X-Flip): - canvasX = (perp + halfPerp + 0.5) * TILE_SIZE: east (1102) at canvasX 128 (left), west (1098) at canvasX 1152 (right). Natural order with no swap. - drawImage with positive width and height: map content reads normally, no X-flip on the image. - Labels in normal orientation (no mirrorLabel). Map is now fully natural: no X swap, no X flip, no mirror label. Both the arrangement and image content are in standard orientation.
This commit is contained in:
1 parent
f79e27665c
commit
0a770ba1be
1 file changed
+6
-11
Vendored
+6
-11
@@ -337,10 +337,9 @@ function drawTileAt(lng, perp, dx, dz, centerTileX, centerTileY) {
|
|||||||
// UNPACK_FLIP_Y_WEBGL=true inverts V: canvas top -> texture V=1 (top).
|
// 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
|
// For lng axis (Y): invert canvasY so lng=+12 (corridor front in
|
||||||
// N flight) lands at small canvasY (= screen top after flip).
|
// N flight) lands at small canvasY (= screen top after flip).
|
||||||
// === NATURAL ORDER BUILD v4 ===
|
// === NO X-SWAP, NO X-FLIP BUILD v5 ===
|
||||||
// No X-swap: east (perp=-2) -> canvasX 128 (left of canvas),
|
// Natural order, no swap. East (perp=-2) -> canvasX 128 (left),
|
||||||
// west (perp=+2) -> canvasX 1152 (right). Map content is also
|
// west (perp=+2) -> canvasX 1152 (right). No image X-flip.
|
||||||
// not X-flipped, so the user sees the image in normal orientation.
|
|
||||||
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;
|
var canvasY = (lng + halfLong + 0.5) * GROUND_TILE_SIZE;
|
||||||
if (canvasX < 0 || canvasX >= groundCanvas.width || canvasY < 0 || canvasY >= groundCanvas.height) {
|
if (canvasX < 0 || canvasX >= groundCanvas.width || canvasY < 0 || canvasY >= groundCanvas.height) {
|
||||||
@@ -351,13 +350,9 @@ 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-flip the image (NS-mirror). The arrangement uses the
|
// No X-flip on the image. Map content reads normally.
|
||||||
// natural order (canvasX = perp + ...) so east tiles are on
|
groundCtx.drawImage(img, canvasX, canvasY,
|
||||||
// the LEFT of the screen. The image X-flip makes image east
|
GROUND_TILE_SIZE, GROUND_TILE_SIZE);
|
||||||
// appear on the right of each east tile (the natural map
|
|
||||||
// orientation).
|
|
||||||
groundCtx.drawImage(img, canvasX + GROUND_TILE_SIZE, 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