Add animated emote support

Animate multi-frame sprite-sheet emotes (e.g. :meow:) using ClassicAPI's
extended |T texcoord-crop escape, across every context.

- TwitchEmotes_animation_metadata (per-sheet frame layout) added to
  Emotes.lua; animated emotes' base entries cropped to frame 0 so any
  un-animated context shows a clean first frame, not the whole sheet.
- TwitchEmotesAnimator.lua: ~30fps ticker advancing the current frame in
  chat lines, the autocomplete popup, dropdown menus, chat bubbles, and
  the stats screen (featured icons + ranked lists).
- Re-converted sprite sheets to uncompressed, unflipped, native
  dimensions (1.12 cannot decode RLE TGA); fixed Clap.tga which was a
  single 32x32 frame.
This commit is contained in:
Brues
2026-09-02 16:30:12 -05:00
parent 197a1a1c4b
commit fdff71922e
116 changed files with 383 additions and 116 deletions
+15 -2
View File
@@ -108,6 +108,7 @@ for i = 1, MAX_SUGGESTIONS do
b:Hide()
btns[i] = b
end
popup.btns = btns -- exposed so TwitchEmotesAnimator can crop each icon's frame
-- ── Show / hide / select helpers ───────────────────────────────────────────────
@@ -152,8 +153,20 @@ local function showPopup(eb, results)
local key = emoticons[name] or name
local entry = defaultpack[key]
local tex = entry and entry:match("(.*%.tga)")
if tex then b.ico:SetTexture(tex); b.ico:Show()
else b.ico:Hide() end
if tex then
b.ico:SetTexture(tex)
-- animated emote sheets crop to a frame; the animator advances it
b.animdata = TwitchEmotes_animation_metadata and TwitchEmotes_animation_metadata[tex]
if b.animdata then
b.ico:SetTexCoord(0, 1, 0, b.animdata.frameHeight / b.animdata.imageHeight)
else
b.ico:SetTexCoord(0, 1, 0, 1)
end
b.ico:Show()
else
b.ico:Hide()
b.animdata = nil
end
b:Show()
else
b:Hide()