Skip to content

Fix browser viewport filling during startup and resize - #6

Merged
xenorune merged 1 commit into
mainfrom
fix/browser-resize
Oct 2, 2026
Merged

xenorune merged 1 commit into
mainfrom
fix/browser-resize

Conversation

@xenorune

@xenorune xenorune commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

Browser resize events can arrive before asynchronous GPU initialization finishes, leaving the pixel surface at its startup size. Native minimum-size constraints also clipped browser viewports narrower than 320px or shorter than 240px.

Reconcile the surface when the pixels wrapper appears, remove browser minimum canvas dimensions, and let logical buffers shrink to fit small viewports. Native constraints, integer scaling, and FOV limits remain in place.

Validation:

  • cargo fmt --all, cargo check --all, and checks/tests with sector sector_edit doom_import passed
  • just build-web passed
  • Computer testing in Chrome passed at 300×500, 400×200, 960×720, 1200×600, 600×900, and normal Retina sizing, including fresh launch and repeated resize
  • Small-viewport regression test failed before the fix and passes afterward

Browser GPU startup coverage is currently manual; automating it is recorded in TODO.md.

Reconcile the pixel surface after asynchronous web GPU initialization so
resize events received before the wrapper exists cannot leave stale borders.
Allow the canvas and logical buffer to fit browser viewports below the
native minimum while preserving native constraints and integer scaling.

Add small-viewport regression coverage and document browser sizing.

Co-authored-by: Xeno <xeno@xenorune.com>
@xenorune
xenorune marked this pull request as ready for review October 2, 2026 23:37
@xenorune
xenorune merged commit 0fa42d2 into main Oct 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants