mirror of
https://github.com/brues-code/TwitchEmotes.git
synced 2026-10-21 12:50:52 +00:00
Repack over-tall emote sheets into a 2-column grid
The client caps a texture at 1024px in either dimension - nothing in its own art exceeds it - and squeezes anything larger on load, so every 32px crop of a 32x2048 sheet landed between frames and the emote rendered as a stretched smear scrolling vertically. catJAM, pedro, goinginsane, HUHH, Kiss and Awoken are now 64x1024, the same frames laid out row-major across two columns. The animator derives the column count from imageWidth / frameWidth, so single-column sheets produce the same crop they did before. Fixed the frame-0 crops in the autocomplete popup and the stats screen, which hardcoded the full texture width. Also: HACKERMANS is a single 32x32 frame on disk but was declared as 11 frames of 32x512, which rendered it as the same kind of sliver; it is now a static icon. Dropped the shadowed duplicate RIPBOZO metadata entry.
This commit is contained in:
@@ -84,7 +84,8 @@ local function setTopEmote(tex, emote)
|
||||
-- store animdata so the animator can crop frames; frame 0 as the base
|
||||
tex.animdata = tga and TwitchEmotes_animation_metadata and TwitchEmotes_animation_metadata[tga]
|
||||
if tex.animdata then
|
||||
tex:SetTexCoord(0, 1, 0, tex.animdata.frameHeight / tex.animdata.imageHeight)
|
||||
tex:SetTexCoord(0, tex.animdata.frameWidth / tex.animdata.imageWidth,
|
||||
0, tex.animdata.frameHeight / tex.animdata.imageHeight)
|
||||
else
|
||||
tex:SetTexCoord(0, 1, 0, 1)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user