Animations! And these actually work ... unlike Blizz' ones
Creates a new fx-object
- FxTable = table holding options
Registers a new animation for use within LibFx
- name = Name of animation
- get = Function for getting the initial value
- set = Function for setting the value the statusbar texture (default "ADD")
Registers a new ramp for use within LibFx
- name = Name of ramp
- func = Function which returns the value to use
- anim: String or table which holds the animation
- ramp: String or table how the animation should progress (default: Linear)
- frame: The frame which should be animated
- delay: time in seconds before the animation should start (default: 0)
- loop: Start the animation again after it stopped (default: nil)
- onStart: Optional function which is called on startup with func(frame, fxObject)
- onComplete: Optional function which is called on stop with func(frame, fxObject)
Starts the animation
Stops the animation
Returns whether the animation is running
- Alpha: Fade the frame to the value of fxTable.finish
- Scale: Scale the frame to the value of fxTable.finish
- Height: Set the frame's height to the value of fxTable.finish
- Width: Set the frame's width to the value of fxTable.finish
- Rotate: Rotate the frame by the value of fxTable.rad (radians) or fxTable.deg (degrees)
- Translate: Move the frame by fxTable.xOffset and fxTable.yOffset
- VertexColor: Change the color of the texture to fxTable.r, fxTable.g, fxTable.b
- Linear: A linear curve
- Smooth: A logistic curve
local LFX = LibStub("LibFx-1.1")
local fadeFrame = LFX.New{
frame = MyFrame,
anim = "Alpha",
ramp = "Smooth",
finish = 0,
duration = 0.3,
}
Fades out MyFrame in 0.3 seconds by using a logistic / smooth curve.