Commit Graph
8 Commits
Author SHA1 Message Date
Behdad EsfahbodandClaude Opus 4.6 58f84001c3 [gpu] Show simplified help text on mobile, clean up desktop help
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 12:57:49 -06:00
Behdad EsfahbodandClaude Opus 4.6 1a8621c557 [gpu] Show simplified help text on mobile
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 12:54:02 -06:00
Behdad EsfahbodandClaude Opus 4.6 ccc532d999 [gpu] Hide font/text buttons on mobile
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 12:51:52 -06:00
Behdad EsfahbodandClaude Opus 4.6 67ecdf8da7 [gpu] Add text editing modal to web demo
Add a "text" button that opens a modal textarea with the current
text.  Apply sends new text to WASM, flushing the glyph cache and
atlas.  Custom text is preserved across font changes.

Also adds demo_font_clear_cache() and demo_atlas_clear() for
flushing state without full destroy/recreate.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 12:48:44 -06:00
Behdad EsfahbodandClaude Opus 4.6 ce3b2df037 [gpu] Add font file loading to web demo
Add a font button and drag-and-drop support to the web demo.
When a user provides their own .ttf/.otf font, the glyph cache
and atlas are flushed and the display is rebuilt with English-only
text (since the font may not support Persian).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:41:22 -06:00
Behdad EsfahbodandClaude Opus 4.6 1ffb1faf82 [gpu] Add controls overlay to web demo
Show mouse and keyboard shortcuts in the bottom-left corner.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 17:30:11 -06:00
Behdad EsfahbodandClaude Opus 4.6 3b7bfd4289 [gpu] Pinch-to-zoom and proportional scroll zoom
Make scroll zoom proportional to delta (pow(STEP, yoffset))
instead of fixed steps.  Add JS pinch-to-zoom handler that
translates two-finger touch to wheel events with a dead zone
to prevent jitter.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 01:44:28 -06:00
Behdad EsfahbodandClaude Opus 4.6 90e8b99cd5 [gpu] Add Emscripten web demo; mobile touch support
Web build using Emscripten + WebGL2 with HB_GPU_ATLAS_2D mode.
Touch support: drag to pan, tap to toggle animation.
FPS counter overlay. Viewport meta for mobile.

Fix cursor position on first touch by querying glfwGetCursorPos
in mouse_func. Left click/tap also toggles animation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 01:31:28 -06:00