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); }