fix: Adjust initial camera zoom to prevent over-zooming on puzzle load

- Use fitZoom * 0.6 for minZoom to provide comfortable padding around puzzle pieces
- Keep initial view at full fitZoom for better first impression and usability
This commit is contained in:
Brian Fertig 2026-04-05 19:45:38 -06:00
parent 78b7a91fcd
commit 0af6e00469
1 changed files with 3 additions and 2 deletions

View File

@ -826,8 +826,9 @@ class PuzzleScene extends Phaser.Scene {
const cam = this.cameras.main; const cam = this.cameras.main;
// Zoom to fit the entire world on screen // Zoom to fit the entire world on screen
this._minZoom = Math.min(width / worldW, height / worldH); const fitZoom = Math.min(width / worldW, height / worldH);
cam.setZoom(this._minZoom); this._minZoom = fitZoom * 0.6;
cam.setZoom(fitZoom);
// Centre camera on the world. // Centre camera on the world.
// In Phaser 3.9 the camera centre in world space is: // In Phaser 3.9 the camera centre in world space is: