Skip to content

Instantly share code, notes, and snippets.

@mooreatv
Created July 12, 2019 23:37
Show Gist options
  • Save mooreatv/d6dfabc224fbb1b8d7b894b0f2a00b85 to your computer and use it in GitHub Desktop.
Save mooreatv/d6dfabc224fbb1b8d7b894b0f2a00b85 to your computer and use it in GitHub Desktop.
Sample animation... showing SetFromAlpha and SetToAlpha apparently backward
if TST then
TST:Hide()
end
TST = CreateFrame("Frame")
local f = TST
f:SetSize(1,1)
f:SetScale(2) -- show pixels / zoom
local tg = f:CreateTexture()
tg:SetTexture(516954) -- interface/timer/hordeglow-logo.blp
tg:SetBlendMode("ADD")
tg:SetAlpha(0) -- start with no glow
local glow = tg:CreateAnimationGroup()
local anim = glow:CreateAnimation("Alpha")
anim:SetFromAlpha(.25) -- backward... should be To??
anim:SetToAlpha(0)
--anim:SetSmoothing("IN")
--glow:SetLooping("BOUNCE")
anim:SetDuration(2)
--anim:SetOrder(1)
local tl = f:CreateTexture()
tl:SetTexture(516953) -- interface/timer/horde-logo.blp
tg:SetPoint("TOP")
tl:SetPoint("TOP")
f:SetPoint("TOP")
f:Show()
glow:Play(true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment