This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
API
:CreateRecursiveAnimationGroup(frame, name, inheritsFrom)
Arguments
frame
Frame that should be animated (Frame)
name
Optional, global identifier (string)
inheritsFrom
Optional, temlate for animationGroup (string)
Returns
recursiveAnimationGroup
Object similar to AnimationGroup, that allows you to control given frame with its child frames as single object. For further info see RecursiveAnimationGroup documentation
Usage
libAnim = LibStub : GetLibrary ( " LibRecursiveAnim-1.0" );
local MyFrame1 = CreateFrame ( " Frame" , nil , UIParent );
MyFrame1 : SetHeight ( 100 );
MyFrame1 : SetWidth ( 100 );
MyFrame1 : SetPoint ( " CENTER" );
local Texture1 = MyFrame1 : CreateTexture ();
Texture1 : SetAllPoints ();
Texture1 : SetTexture ( 0 , 0 , 0 );
local animationGroup = libAnim : CreateRecursiveAnimationGroup ( MyFrame1 );
local animation = animationGroup : CreateAnimation ( " Rotation" );
animation : SetDegrees ( 180 );
animation : SetDuration ( 10 );
local MyFrame2 = CreateFrame ( " Frame" , nil , MyFrame1 );
MyFrame2 : SetHeight ( 100 );
MyFrame2 : SetWidth ( 100 );
MyFrame2 : SetPoint ( " BOTTOMLEFT" , MyFrame1 , " TOPRIGHT" );
local Texture2 = MyFrame2 : CreateTexture ();
Texture2 : SetAllPoints ();
Texture2 : SetTexture ( 0 , 0 , 0 );
animationGroup : Refresh ();
animationGroup : Play ();