Commit Graph
12 Commits
Author SHA1 Message Date
valknar 4dd6d60457 Stop the pinball engine from hijacking the browser tab's favicon
vpinball.js sets a table-supplied image as the page favicon via a blob:
URL as a table loads. Revert any blob: href on the icon <link> the
moment it appears, via a MutationObserver, instead of patching the
compiled engine.
2026-08-24 13:46:26 +02:00
valknar 0afa61cc5c Use proper SVG icons in the touch control bar, center the middle cluster absolutely
Swaps the unicode glyphs (◀ ▶ ⬆) for hand-drawn stroke/fill SVG icons
(chevrons, an eject-style plunger glyph, a coin glyph, a play triangle),
and positions the coin/start/plunger cluster with absolute + translate
so it sits on the bar's true center regardless of the flipper buttons.
2026-08-24 13:28:45 +02:00
valknar 9e8f08ba16 Replace mobile touch overlay with a coin-door-styled bottom control bar
The engine's default attachTouchControls() overlay was generic floating
circles; this swaps in an app-themed bottom bar (left/right flipper,
plunger, insert coin, start game) anchored to the screen edges instead.
2026-08-24 13:24:47 +02:00
valknar a193bdb3da fix(sw): stop precaching /404.html, it 403s and breaks the whole addAll
nginx serves /404.html as internal-only (see docker/nginx.conf) so it
preserves the real 404 status via error_page - any direct client fetch,
including the service worker's install-time addAll, gets a 403. Since
addAll is atomic, that one bad URL was failing precache of the entire
app shell.
2026-08-24 12:42:49 +02:00
valknarandClaude Sonnet 5 44504c718d Fix eject hanging the tab on ROM-based tables
Bump @valknar/vpinball-wasm to 0.3.3, which fixes a genuine infinite
busy-wait in the PinMAME plugin's Controller::Stop() under Emscripten
(no OS thread ever clears the flag it spins on) — this fired from
dispose()'s synchronous script Exit event on any ROM-based table,
hanging the tab permanently.

Sequence unmount cleanup as stop() then two animation frames then
dispose(), instead of dispose() alone, matching the consumer pattern
the engine fix expects (stop() only takes effect on its next internal
step, so disposing immediately after can still race it).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-24 10:27:35 +02:00
valknarandClaude Sonnet 5 53c8ea03ac Show a spinner while the table is starting
instance.start() runs synchronously and blocks the main thread for a
noticeable moment on heavy WASM init, so pressing "Tap to Start" would
freeze on the old screen with no feedback until the HUD suddenly
appeared. Add a "starting" status between "ready" and "running", and
defer the actual start() call by a nested rAF so the browser gets a
chance to paint the spinner before the blocking call runs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-24 09:52:30 +02:00
valknarandClaude Sonnet 5 d7ea38d8ee Replace app icon set with a themed pinball-flipper glyph
Recolor a supplied ball-and-flippers glyph in the app's cabinet palette
(amber ball, chrome flippers) and place it on the ink rounded-square
background used elsewhere in the icon set. Regenerate every derived
asset (192/512/maskable PNGs, favicon.ico, app/icon.png) from it.
icon.svg/icon-source.svg now embed the composited PNG directly, since no
vector-trace tool was available to rebuild it as real vector paths.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-24 09:07:48 +02:00
valknarandClaude Sonnet 5 a28410336d Configure docker-compose for Coolify/Traefik deployment
Replace the host-port-published nginx service with one that joins an
external Docker network and routes entirely through Traefik labels
(HTTP->HTTPS redirect, TLS router, security-headers middleware), matching
the pattern used by other Coolify-deployed projects. Add .env.example for
TRAEFIK_ENABLED/TRAEFIK_HOST/NETWORK_NAME and document the new deploy flow
and local-preview alternative in the README.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-24 09:07:34 +02:00
valknarandClaude Sonnet 5 958f091c56 Polish home CTAs, panel rounding, and 404 label; fix dev-mode SW crash
- Shorten CTA labels to "Play Demo" / "Load Table"
- Fix mismatched corner radii on the hero and table-staging panels
- Add horizontal padding to the in-game "insert coin" hint on mobile
- Match the 404 page's "TILT" eyebrow label size to the rest of the site
- Only register the service worker in production — it precaches
  /404.html, which doesn't exist as a static file under `next dev` and
  was failing cache.addAll() on every load

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-24 08:35:18 +02:00
valknarandClaude Sonnet 5 35fb68c916 Add ROM upload, local table library, engine bump, and UX/responsiveness fixes
- Bump @valknar/vpinball-wasm to 0.3.2 (PinMAME ROM support, MsgBox fix)
- Add optional PinMAME ROM .zip upload alongside .vpx tables
- Persist uploaded tables/ROMs in IndexedDB so users don't have to
  re-upload on later visits, with a library list on the landing page
- Fix Insert Coin key mismatch with the engine's real coin-door gating
  (now bound to 4, matching the shared table scripts) and surface it
  in the controls legend and "Tap to Start" hint
- Make the landing page, staging panel, and in-game HUD responsive for
  portrait phone widths; drop the landscape hint since portrait plays fine
- Replace the separate STATS HUD toggle with an FPS row in the info panel

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N9JmzRBZenapVkFWjw9jmG
2026-08-23 20:15:41 +02:00
valknarandClaude Sonnet 5 5b30442c4a Opt Big Shoulders out of automatic fallback-metrics adjustment
Next's fallback-metrics table has no entry for this (newer, merged
variable-font) family name, so the CLS-reducing fallback override it
tries to generate always fails with a build warning. Correctly
suppresses it under webpack; Turbopack (this project's default
builder) doesn't yet honor the flag the same way, so the warning
still prints there today, but the setting is still the semantically
correct declaration of intent and forward-compatible.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012hQoM3jJT1Lx7CMTciMzvD
2026-08-23 05:39:09 +02:00
valknarandClaude Sonnet 5 e493a12e68 Add vpinball: a browser Visual Pinball player
Next.js app that plays real .vpx tables via @valknar/vpinball-wasm
(WebAssembly Visual Pinball). Demo mode with the bundled default
table, drag-and-drop custom table upload, a cabinet-styled UI with a
coin-door HUD (fullscreen/stats/info/eject), a custom 404 page, PWA
support (hand-rolled service worker), and a static Docker Compose
deployment behind nginx.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012hQoM3jJT1Lx7CMTciMzvD
2026-08-23 05:25:15 +02:00