webclient: fix browser scaling and zoom

- Add [display] section to project.godot:
  - 1280x720 base viewport (was unset → Godot default tiny resolution)
  - stretch/mode = canvas_items: all UI + text scales proportionally
  - stretch/aspect = expand: fills window, adds space on wider screens
- Add html/head_include script that runs on page load:
  - Sets canvas touch-action to 'auto' (removes Godot's default 'none'
    which blocked pinch-to-zoom on mobile)
  - Patches viewport meta to allow user-scalable=yes, maximum-scale=5.0
    so browser zoom works on both desktop and mobile

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
dingo
2026-02-28 22:28:48 -05:00
co-authored by Claude Happy
parent bcd154ad1e
commit 2dcb5c48c8
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -25,6 +25,13 @@ Auth="*res://autoloads/Auth.gd"
pointing/emulate_touch_from_mouse=true
[display]
window/size/viewport_width=1280
window/size/viewport_height=720
window/stretch/mode="canvas_items"
window/stretch/aspect="expand"
[rendering]
renderer/rendering_method="gl_compatibility"