From 71aee058b55e5f5357f9b0ffcc0313ea06ce4b36 Mon Sep 17 00:00:00 2001 From: tekki mariani Date: Sat, 21 Mar 2026 12:01:38 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20update=20CHANGELOG=20for=20Issue?= =?UTF-8?q?=20#5=20zoom-to-mouse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bb8722..e26536e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,8 +20,12 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Villagers are now called **Nisse** throughout the UI (panel, controls hint, stockpile display, context menu, spawn message) ### Added -- Scroll wheel now zooms toward the mouse cursor position instead of the screen center +- Scroll wheel zooms toward the mouse cursor position (zoom-to-mouse), correctly accounting for Phaser's center-based zoom model - Middle mouse button held: pan the camera by dragging +- Test environment at `/test.html` with `ZoomTestScene` (Phaser default) and `ZoomMouseScene` (zoom-to-mouse) for camera behaviour analysis; file-logging via Vite middleware to `game-test.log` + +### Fixed +- `getCenterWorld()` in `CameraSystem` returned wrong world coordinates at zoom ≠ 1; corrected from `scrollX + width/(2·zoom)` to `scrollX + width/2` - Right-click context menu: suppresses browser default, shows Build and Nisse actions in the game world - Initial project setup: Phaser 3 + TypeScript + Vite - Core scenes: `BootScene`, `GameScene`, `UIScene`