Reply
Thread Tools Display Modes
Unread 01-31-14, 01:24 PM   #1
Duugu
Premium Member
 
Duugu's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 742
Feature request: animations

This is a crosspost to http://www.wowinterface.com/forums/s...343#post290343


Currently a widget will be reset when an animation ends (to it's original position, angle, etc.).

An option/flag to retain the widgets position, angle, etc. at the end of an animation would be a great addition to the animation feature. For example to 'permanently' rotate a widget.

Thank you.
Duugu is offline   Reply With Quote
Unread 01-31-14, 05:52 PM   #2
Choonstertwo
A Flamescale Wyrmkin
 
Choonstertwo's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2011
Posts: 106
This would quite a handy addition.
Choonstertwo is online now   Reply With Quote
Unread 02-01-14, 04:48 AM   #3
Resike
A Molten Giant
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 618
You mean like animationGroup:SetLooping("REPEAT"), or i'm not sure what do you mean.
Resike is offline   Reply With Quote
Unread 02-01-14, 07:26 AM   #4
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,409
No, he means that if you do:
Code:
local frame = CreateFrame("Frame")
frame:SetAlpha(0)

local group = frame:CreateAnimationGroup()

local anim = group:CreateAnimation("ALPHA")
anim:SetChange(1)
anim:SetDuration(1)

group:Play()
... the frame will fade in from 0% to 100% opacity over 1 second, but at the end of the 1 second, it will drop back to the original 0% opacity. He wants an option for it to remain at the 100% opacity state, without having to add an OnFinished script that manually applies that value. For an alpha animation, that's obviously easy, but for an animation group that's moving and rotating whole frames, for example, the whole point of using the animation is so that you don't have to do all the math yourself to move and rotate the frame, so it's annoying to have to manually duplicate the final state of the animation in an OnFinished script.

Looping would not help here, as a loop would just make the frame fade in and out repeatedly, which is not the desired behavior.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote
Unread 02-01-14, 08:59 AM   #5
Duugu
Premium Member
 
Duugu's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 742
Yes, that's exactly what I was asking for.

At the moment I'm doing it via ag:SetEndDelay() and then pausing the animation at onFinish (which is fired if the animation itself is done and before the delay starts).

But I wouldn't consider this as a good practice. It's rather a bad hack than 'using a feature'.
I introduces some unwanted problems too.

It's even worse with rotating than with fading or translating. Afaik the animation is the only way to rotate a frame (let's say an action button that represents a clickable area). The only other way to rotate something is SetTexCoord(), which applies to textures only.

Last edited by Duugu : 02-01-14 at 10:04 AM.
Duugu is offline   Reply With Quote
Unread 02-01-14, 09:54 AM   #6
Resike
A Molten Giant
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 618
Originally Posted by Phanx View Post
No, he means that if you do:
Code:
local frame = CreateFrame("Frame")
frame:SetAlpha(0)

local group = frame:CreateAnimationGroup()

local anim = group:CreateAnimation("ALPHA")
anim:SetChange(1)
anim:SetDuration(1)

group:Play()
... the frame will fade in from 0% to 100% opacity over 1 second, but at the end of the 1 second, it will drop back to the original 0% opacity. He wants an option for it to remain at the 100% opacity state, without having to add an OnFinished script that manually applies that value. For an alpha animation, that's obviously easy, but for an animation group that's moving and rotating whole frames, for example, the whole point of using the animation is so that you don't have to do all the math yourself to move and rotate the frame, so it's annoying to have to manually duplicate the final state of the animation in an OnFinished script.

Looping would not help here, as a loop would just make the frame fade in and out repeatedly, which is not the desired behavior.
I see, sadly animationgroups have so many issues with them, thats why so few developer uses it. They basically only created for the spell activation overlay effects, and it's even buggy there.
Resike is offline   Reply With Quote
Unread 02-01-14, 09:56 AM   #7
Resike
A Molten Giant
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 618
Also you could add this to the list:

If you animate something with SetGradientAlpha added it drop it's colors during the animation.
Resike is offline   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » Wish List » Feature request: animations

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off