Skip to content

Overhaul web export page

Rafał Mikrut requested to merge github/fork/leonkrause/web-export-page into master

Created by: leonkrause

This change trims the web export page.

Changes

  • Minimum size is canvas size, so no scrollbars as long as the game fits, e.g. for iframe
  • Controls as overlay, hidden until hover
    • Can be disabled completely
  • Status display as overlay
    • Hides on click (for emergency, in case status freezes...)
  • Output only visible in debug export
    • Visibility can be toggled per controls
  • Godot default theme style
  • Should be HTML/XML polyglot (but hard to verify)
  • Separate Emscripten interface Module logic from page Presentation logic
  • Add export options to customize page:
    • Page title (<title>)
    • <head> include
    • Fonts (font-family)
    • CSS include
    • Controls visibility
  • Prevent exception when clicking fullscreen button before fully loaded
  • Fix canvas being smaller than game
  • Fix iframed page not regaining focus on click

Demonstration

web-export-options These settings are also used for the following demonstrations.

Closes #2774 (closed)

To do later:

  • Implement canvas resize
    • Substract output height when visible
  • Implement fullscreen button properly
  • Implement cursor lock toggle
  • Less ridiculous vertical centering for status display
  • Handle webglcontextlost event
  • Style checkboxes — Hacky, would have to include "check" texture
  • Spinner? — Seems annoying to me, maybe a loading bar when setStatus cooperates

Merge request reports