✨ 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:
21
src/test/main.ts
Normal file
21
src/test/main.ts
Normal 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)
|
||||
Reference in New Issue
Block a user