From cda871a56d7747b10274a51f26a2f17f910f4bf9 Mon Sep 17 00:00:00 2001 From: "Zed(Zijun) Chen" Date: Mon, 9 Dec 2024 21:34:08 +0800 Subject: [PATCH] _ --- editor/src/utils/MapRenderer.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/editor/src/utils/MapRenderer.ts b/editor/src/utils/MapRenderer.ts index 040f423..c89191d 100644 --- a/editor/src/utils/MapRenderer.ts +++ b/editor/src/utils/MapRenderer.ts @@ -230,7 +230,7 @@ class Internal { const block = fogMap.tiles[FogMap.FogMap.makeKeyXY(fowTileX, fowTileY)]?.blocks[ - FogMap.FogMap.makeKeyXY(fowBlockX, fowBlockY) + FogMap.FogMap.makeKeyXY(fowBlockX, fowBlockY) ]; if (block) { @@ -423,18 +423,18 @@ export class MapRenderer { this.mainCanvas.height = 512 * (bottom - top + 1); this.renderOnce(); const tileBounds = new mapboxgl.LngLatBounds( - tileXYToLngLat([left, top], zoom), - tileXYToLngLat([right + 1, bottom + 1], zoom) + tileXYToLngLat([left, bottom + 1], zoom), + tileXYToLngLat([right + 1, top], zoom) ); const mainCanvasSource = this.mapboxMap.getSource( "main-canvas-source" ) as mapboxgl.CanvasSource | undefined; mainCanvasSource?.setCoordinates([ - tileBounds.getSouthWest().toArray(), - tileBounds.getSouthEast().toArray(), - tileBounds.getNorthEast().toArray(), tileBounds.getNorthWest().toArray(), + tileBounds.getNorthEast().toArray(), + tileBounds.getSouthEast().toArray(), + tileBounds.getSouthWest().toArray(), ]); }