Commit Graph
3 Commits
Author SHA1 Message Date
Dark98 ededb882a0 refactor(web): rename 117HD WebGL2 renderer and UI references to 317HD
Renames `WebHd117Renderer` and all remaining `117HD` symbols, build exclusions, and UI labels in `2006Scape-Web` to `317HD`.

### WebGL2 Renderer & Build
- `WebHd317Renderer.java`:
  - Renamed from `WebHd117Renderer.java` and updated class/log references to `WebHd317Renderer` / `317HD`.
- `build.gradle`, `WebLauncher.java`, `RSImageProducer.java`, `DesktopHooks.java`, `WebGL2.java`:
  - Updated `DesktopHd117Renderer.java` exclusion to `DesktopHd317Renderer.java` and updated pipeline/renderer call sites to `HD317Pipeline` and `WebHd317Renderer`.
- `src/main/webapp/index.html`:
  - Updated UI label from `117HD (WebGL2)` to `317HD (WebGL2)`.
2026-11-30 21:57:21 +00:00
Dark98 33235cec55 perf(web): eliminate putImageData via WebGL2 quad, sync frame pacing, and add PWA/Service Worker
Replaces `ctx2d.putImageData` with a WebGL2 texture quad in both 117HD and SD modes, aligns the TeaVM game loop with `requestAnimationFrame`, and adds PWA manifest and Service Worker asset caching for mobile/iOS Safari.

### WebGL2 Compositing & SD/HD Rendering
- `WebHd117Renderer.java`, `WebGL2.java`:
  - Decoupled `ensureOverlayContext()` / `ensureOverlayReady()` so the WebGL2 2D overlay quad initializes without compiling 3D shadow/scene shaders when 117HD is off.
  - Added `drawHudPixels` and `drawHudCanvas` compositing onto `#gl-canvas` with `useBlend` control (disabling `GL_BLEND` for opaque SD frames).
- `RSImageProducer.java`, `DesktopHooks.java`:
  - Routed `RSImageProducer.drawGraphics` and modern HUD draws (`drawModernMinimap`, `drawModernChat`, `drawModernTab`) through the WebGL2 quad whenever `ensureOverlayReady()` succeeds, clearing `#game-canvas` once to avoid `putImageData` overhead.

### Frame Pacing & Mobile PWA
- `RSApplet.java`:
  - Added TeaVM `@Async` `awaitAnimationFrame()` backed by `window.requestAnimationFrame` for `delay <= 16` and capped catch-up ticks per frame (`loopTicks >= 2`).
- `index.html`, `manifest.webmanifest`, `sw.js`:
  - Added Apple Web App meta tags, `manifest.webmanifest`, and `sw.js` Service Worker registration with shell precaching, network-first navigation, and stale-while-revalidate static asset caching.
2026-11-30 21:54:39 +00:00
Dark98 3331ab745b feat(web): add 2006Scape TeaVM WebGL2 client with mobile support and classic 2006 UI
Initializes the TeaVM-based 2006Scape-Web client repository with WebGL2 117HD rendering, WebSocket networking, SpessaSynth MIDI/PCM audio, and mobile-compatible touch/viewport controls. Preserves Revision 377 cache preloading via IndexedDB and localStorage-backed script and config persistence.

### Core Web Runtime & Rendering
- WebLauncher & DesktopHooks:
  - Added TeaVM entry point with URL/localStorage option parsing, async 377 cache preloading, and WebSocket port routing.
  - Implemented DesktopHooks.boxReflectValue using JSWrapper.isJava/maybeUnwrap to box TeaVM reflection primitives, plus localStorage persistence for plugin settings and imported scripts.
- WebHd117Renderer & RSImageProducer:
  - Implemented WebGL2 117HD rendering with 4x4 chunked static scenery VBOs and 0x010203 transparency sentinel so 0x000000 black UI elements stay opaque.
- WebReflectionSupplier:
  - Exposed PluginContext, PluginGraphics, ScriptInterpreter, ID lists, and Math/System/String/collection methods for TeaVM runtime reflection.

### Mobile & Classic 2006 Web UI
- index.html & RSApplet:
  - Styled the page to match the classic 2006 RuneScape webclient with optional classic navbar (auto-hidden below 765px), 1999-2006 Jagex footer, and responsive Fixed/Resizable/Fullscreen scaling.
  - Added Options modal (auto-login, server, world, 117HD, display mode, navbar) with scrollable body in mobile landscape.
  - Implemented Android-parity touch controls (tap, 450ms long-press right-click, 1-finger camera drag, 2-finger pinch zoom clamped to -1..8, and auto-keyboard on input fields).
2026-11-30 20:45:03 +00:00