Overlay: cassette redeems, emote effects, poll card, Hype Train bar, raid card

New overlay modules (taped-paper look, shared with the polaroid alerts):
- cassette.js: redeems as a cassette tape; rarity = shell colour (Ultra Rare gold
  with glow, foil and sparkles), reels spin for the sound's length, sticker corner.
- fx.js: Gigantify (viewer's emote grows giant), On-Screen Celebration (emote
  copies bounce around the screen), highlight / Message Effect (tall taped note).
- poll.js: live poll card with bars, countdown and a WINNER stamp.
- hypebar.js: persistent Hype Train strip (level, progress, time left).
- raidcard.js: silent raid send-off card that stays during the raid countdown.
- nowplaying.js: Feishin now-playing slip (not loaded yet, see overlay).

polaroid.js: shared queue now also drives cassettes/effects; test alerts replace
only other tests and never cut off real alerts; alerts stay up for the animation
+ 3 s or the sound's length; sound lengths measured in the browser for UI-picked
sounds; tip and Hype Train alerts; optional ALERTS_BASE for offline test pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Bashy 2026-11-20 23:18:15 +02:00
parent 8c649c5bce
commit 1766e37336
14 changed files with 774 additions and 18 deletions

View file

@ -0,0 +1,16 @@
/* "Now playing" strip (see nowplaying.js): small, top-right corner, visible only while music plays. */
#now-playing { --ink:#3a2a20; --red:#b74347; position:fixed; right:24px; top:18px; height:84px; z-index:40; visibility:hidden;
display:flex; align-items:center; gap:0; }
#now-playing * { box-sizing:border-box; }
/* paper slip with the song, taped on */
#now-playing .slip { position:relative; display:flex; align-items:center; gap:10px; max-width:340px; padding:6px 13px 6px 8px;
background:#fffdf7; box-shadow:0 6px 12px rgba(0,0,0,.4); transform:rotate(-1.5deg); }
#now-playing .slip:before { content:''; position:absolute; left:40%; top:-9px; width:58px; height:18px; transform:rotate(-4deg);
background:rgba(201,182,228,.88); background-image:repeating-linear-gradient(45deg,#fff6 0 6px,#0000 6px 12px); }
#now-playing .cover { width:50px; height:50px; flex:none; background:#e8dcc8 center/cover; box-shadow:0 2px 4px rgba(0,0,0,.3);
border:2px solid #fff; transform:rotate(3deg); }
#now-playing .txt { min-width:0; }
#now-playing .t { font:700 23px/1.05 'Caveat', cursive; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#now-playing .t:before { content:'♪ '; color:var(--red); }
#now-playing .a { font:700 17px/1.1 'Caveat', cursive; color:#7a6656; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }