2 Commits
Author SHA1 Message Date
SirStone d225e956ca test(client): drag through the camera transform after #69
Rebase #72 onto the map/pan-zoom lane. Drag e2e now converts world points to
page points with the camera transform, drags at zoom 0.5 and 4, and proves a
token drag leaves the camera alone while an empty-canvas gesture still pans.
The camera publishes its x/y in `data-camera` for that (UI fact, like zoom).
Also folds #69's duplicate viewport import in tiles.ts into one.
2026-11-21 09:51:44 +01:00
SirStone c7d5e2cc69 feat(client): drag with prediction and rollback (#72)
Drag a controlled token (GM: any token) at <=20 Hz plus a final send on release;
the sprite follows the pointer while authoritative frames are ignored for drawing.
Uniform move nacks roll back with a short tween (on release if still dragging),
rate-limited acks drop quietly, and pending reqIds die with the connection.

- slices/move.ts: pure drag/pending/ack state machine at the reducer seam
- render/modules/drag.ts: canvas pointer input, capture-phase so token drag wins
  over pan/pinch (#69); sends via the new intents bridge
- tokens renderer draws the optimistic/confirmed position and tweens the rollback
- intents.ts + ws.send onReqId: one reqId-keyed sender for render modules
- e2e: drag persists after reload, wall refusal tween, GM move mid-drag,
  reconnect mid-drag dropping the pending map
2026-11-21 09:41:03 +01:00