Issue #5: Mouse handling — zoom-to-mouse + middle-click pan #10

Merged
tekki merged 21 commits from feature/mouse-handling into master 2026-03-21 14:06:45 +00:00
Showing only changes of commit d83b97a447 - Show all commits

View File

@@ -1,12 +1,12 @@
import Phaser from 'phaser' import Phaser from 'phaser'
import { TILE_SIZE } from '../config' import { TILE_SIZE } from '../config'
const GRID_TILES = 50 // world size in tiles const GRID_TILES = 500 // world size in tiles
const MIN_ZOOM = 0.25 const MIN_ZOOM = 0.25
const MAX_ZOOM = 4.0 const MAX_ZOOM = 4.0
const ZOOM_STEP = 0.1 const ZOOM_STEP = 0.1
const MARKER_EVERY = 5 // small crosshair every N tiles const MARKER_EVERY = 10 // small crosshair every N tiles
const LABEL_EVERY = 10 // coordinate label every N tiles const LABEL_EVERY = 50 // coordinate label every N tiles
const CAMERA_SPEED = 400 // px/s const CAMERA_SPEED = 400 // px/s
const SNAPSHOT_EVERY = 2000 // ms between periodic log snapshots const SNAPSHOT_EVERY = 2000 // ms between periodic log snapshots