add ZoomTestScene with Phaser default zoom for analysis

Separate test environment at /test.html (own Vite entry, own Phaser
instance). ZoomTestScene renders a 50×50 tile grid with crosshair
markers and a live HUD overlay showing zoom, scroll, viewport in px
and tiles, mouse world/screen/tile coords, and renderer info.
Zoom uses plain cam.setZoom() — no mouse tracking — to observe
Phaser's default center-anchor behavior.
This commit is contained in:
2026-03-21 11:16:39 +00:00
parent 34220818b0
commit 007d5b3fee
4 changed files with 285 additions and 2 deletions

21
src/test/main.ts Normal file
View File

@@ -0,0 +1,21 @@
import Phaser from 'phaser'
import { ZoomTestScene } from './ZoomTestScene'
const config: Phaser.Types.Core.GameConfig = {
type: Phaser.AUTO,
width: window.innerWidth,
height: window.innerHeight,
backgroundColor: '#0d1a0d',
scene: [ZoomTestScene],
scale: {
mode: Phaser.Scale.RESIZE,
autoCenter: Phaser.Scale.CENTER_BOTH,
},
render: {
pixelArt: false,
antialias: true,
roundPixels: true,
},
}
new Phaser.Game(config)