Reward / Power-up icon as a top-left sticker on the cassette and the video box
Twitch icons of channel point rewards (custom images) and Custom Power-ups are cached (10 min, refreshed on unknown triggers, never holding an alert more than 2 s) and attached as alert.icon; cassette.js and video.js show it as a white-outlined sticker on the top-left corner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
b3caac7a31
commit
8ac8fe024c
6 changed files with 63 additions and 7 deletions
|
|
@ -59,6 +59,7 @@
|
|||
<div class="title">${esc(d.title)}</div>
|
||||
<div class="sub">${d.sub && d.sub !== d.title ? esc(d.sub) : ''}</div>
|
||||
<div class="stk"><img src="${esc(d.sticker || DEFAULT_STICKER)}" alt=""></div>
|
||||
${d.icon ? `<div class="ico"><img src="${esc(d.icon)}" alt=""></div>` : ''}
|
||||
${ultra ? '<div class="foil"></div>' + '<div class="spark"></div>'.repeat(6) : ''}
|
||||
</div>
|
||||
<div class="strip"><span class="u">${esc(d.name)}</span> ${esc(d.line)}${d.msg ? `<span class="msg">“${esc(d.msg)}”</span>` : ''}</div>`;
|
||||
|
|
@ -74,6 +75,11 @@
|
|||
{ transform:`translateX(-4px) rotate(${tilt - .6}deg)`, offset:.88 },
|
||||
{ transform:`translateX(0) rotate(${tilt}deg)`, opacity:1 },
|
||||
], { duration:700, easing:'cubic-bezier(.2,.8,.3,1)' });
|
||||
if (q('.ico')) A(q('.ico'), [ // the reward's / Power-up's Twitch icon, top-left corner
|
||||
{ transform:'rotate(10deg) scale(0)', opacity:0 },
|
||||
{ transform:'rotate(-18deg) scale(1.2)', opacity:1, offset:.6 },
|
||||
{ transform:'rotate(-10deg) scale(1)', opacity:1 },
|
||||
], { delay:560, duration:360, easing:'ease-out' });
|
||||
A(q('.stk'), [
|
||||
{ transform:'rotate(-30deg) scale(0)', opacity:0 },
|
||||
{ transform:'rotate(8deg) scale(1.2)', opacity:1, offset:.6 },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue