From 88017add9281010a6d052cd94e1508d6938d8a46 Mon Sep 17 00:00:00 2001 From: Kyle Banicevic Date: Sat, 7 Feb 2026 14:36:18 +1100 Subject: [PATCH] Fixed zooming bug black lines again --- src/core/config/GameConfig.ts | 4 ++-- src/scenes/systems/CameraController.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/config/GameConfig.ts b/src/core/config/GameConfig.ts index 9982e04..29bb10e 100644 --- a/src/core/config/GameConfig.ts +++ b/src/core/config/GameConfig.ts @@ -103,9 +103,9 @@ export const GAME_CONFIG = { rendering: { tileSize: 16, cameraZoom: 2, - minZoom: 0.5, + minZoom: 1, maxZoom: 4, - zoomStep: 0.1, + zoomStep: 1, wallColor: 0x2b2b2b, floorColor: 0x161616, exitColor: 0xffd166, diff --git a/src/scenes/systems/CameraController.ts b/src/scenes/systems/CameraController.ts index 85b8a91..58ab840 100644 --- a/src/scenes/systems/CameraController.ts +++ b/src/scenes/systems/CameraController.ts @@ -58,7 +58,7 @@ export class CameraController { handleWheel(deltaY: number): void { const zoomDir = deltaY > 0 ? -1 : 1; const newZoom = Phaser.Math.Clamp( - this.camera.zoom + zoomDir * GAME_CONFIG.rendering.zoomStep, + Math.round(this.camera.zoom + zoomDir * GAME_CONFIG.rendering.zoomStep), GAME_CONFIG.rendering.minZoom, GAME_CONFIG.rendering.maxZoom );