diablo2-web/src/client/ui
troytt 26e4265e5b feat(client): formula-derived viewport profiles + 1068x600 / 1280x720
Derive every ViewportProfile's HUD anchors from its size instead of
hard-coded literals (1024x768 still yields 112 / 168 / 84):
  barOffsetX   = (W - 800) / 2
  barOffsetY   = H - 600
  panelOffsetY = (H - 600) / 2
and register two widescreen profiles next to 800x600 / 1024x768:
  1068x600 -> bar (134, 0),   panels y = 0,  center corridor 268px
  1280x720 -> bar (240, 120), panels y = 60, center corridor 480px

- viewport-profile: createViewportProfile() fails fast on an id/size
  mismatch, non-integer or sub-800x600 sizes and odd margins; add the
  strict getViewportProfileBySize(), isExtendedViewport() and
  formatViewportLabel(); id/object lookups resolve every profile.
- client-settings: whitelist the new ids (and bare-width shorthands).
- toolbar: the selector lists every profile; toggleViewport() cycles
  800 -> 1024 -> 1068 -> 1280 -> 800.
- hud-manager: every profile larger than 800x600 docks the panels at
  x = 0 / W - 400 with a W - 800 corridor (render + hit-testing);
  resize() resolves the exact registered profile or throws.
- command-mapper: ViewportCamera(width, height) resolves the exact
  registered profile or throws.
- play.html: keep the 800x600 Battle.net front-end canvas 4:3
  (pillarboxed) when the stage is sized for a 16:9 profile.

Tests: tests/client/viewport-formula-profiles.test.ts

TAG=agy
CONV=47cdfa86-71f2-47e6-b71e-1271cc315e1d
2026-10-02 06:22:40 +00:00
..
belt.ts refactor(client): remove leftover single-player client code 2026-10-01 06:03:55 +00:00
boot-progress.ts feat(client): display semantic asset resource type instead of filename during boot 2026-10-01 13:28:45 +00:00
character-sheet.ts fix(client): neutral not-ready HUD state and server-authoritative HUD commands (P1/P2) 2026-10-01 01:41:13 +00:00
control-bar.ts refactor: split into isolated common/netproto/server/client/baker modules 2026-10-01 00:10:18 +00:00
cursor.ts refactor: split into isolated common/netproto/server/client/baker modules 2026-10-01 00:10:18 +00:00
font.ts refactor: split into isolated common/netproto/server/client/baker modules 2026-10-01 00:10:18 +00:00
globes.ts feat(client): integrate on-demand EntityArtCache, object/NPC/flippy/animated-tile rendering, and remove drawSolid fallbacks (#540) 2026-10-01 18:21:03 +00:00
hotkeys.ts refactor(client): remove leftover single-player client code 2026-10-01 06:03:55 +00:00
hud-manager.ts feat(client): formula-derived viewport profiles + 1068x600 / 1280x720 2026-10-02 06:22:40 +00:00
inventory.ts feat(client,netproto): complete D2GS v1.13c online gameplay loops (R1-R5: item tooltips, container ops, NPC dialogue/travel, mercenaries, warps/portals/SkillCast/death, party/trade/quest panels) 2026-10-02 06:08:32 +00:00
minimap.ts refactor: split into isolated common/netproto/server/client/baker modules 2026-10-01 00:10:18 +00:00
skill-tree-panel.ts feat(client): integrate on-demand EntityArtCache, object/NPC/flippy/animated-tile rendering, and remove drawSolid fallbacks (#540) 2026-10-01 18:21:03 +00:00
world-panels.ts feat(client,netproto): complete D2GS v1.13c online gameplay loops (R1-R5: item tooltips, container ops, NPC dialogue/travel, mercenaries, warps/portals/SkillCast/death, party/trade/quest panels) 2026-10-02 06:08:32 +00:00