Handles all actively animated css properties. Also keeps track of a single set of css properties as used in any animate method (PowerUI.HtmlElement.animate) and can be used to monitor the progress of an animation.
Public Member Functions | |
UIAnimation (Element animating, string properties, float duration, Blaze.VectorPath timeCurve) | |
Creates a new UIAnimation for animating CSS and immediately animates it. See PowerUI.HtmlElement.animate. More... | |
UIAnimation (Element animating, Style properties, float duration, Blaze.VectorPath timeCurve) | |
Creates an animation with the given style as the set of target properties. More... | |
void | Finished () |
Called when this animation is finished. More... | |
void | OnDone (DynamicMethod< Nitro.Void > method) |
Calls the given function when the animation is over. More... | |
void | OnDone (AnimationCompleted onComplete) |
Calls the given delegate when the animation is over. More... | |
void | Stop () |
Call this to halt the animation early. This internally will cause the finished event to run. More... | |
void | Stop (bool runEvent) |
Call this to halt the animation early. More... | |
Static Public Member Functions | |
static void | Clear () |
Removes all active animations. More... | |
static void | Update (float frameTime) |
Called at the UI update rate to progress the currently animated properties. More... | |
static AnimatedProperty | GetAnimatedProperty (Element animating, string property) |
Searches the current animated properties for the named property on the given element. More... | |
static AnimatedProperty | GetAnimatedProperty (Element animating, CssProperty property) |
Searches the current animated properties for the named property on the given element. More... | |
Public Attributes | |
object | Data |
A custom data object. More... | |
Element | Animating |
The element being animated. More... | |
ComputedStyle | ComputedStyle |
The CS for the element being animated. More... | |
float | Duration |
The time in seconds that the animation will run for. More... | |
bool | Paused |
True if this animation is paused. More... | |
Blaze.VectorPath | TimeCurve |
A curve which describes the progression of the animation. x is time, y is value. Usually (0,0) to (1,1). More... | |
UIAnimation | NextAnimation |
All current animations are stored in a linked list. This is the next one. More... | |
AnimationCompleted | OnComplete |
The method to call (a c# or JS method) when the animation is done playing. More... | |
DynamicMethod< Nitro.Void > | Done |
The dynamic method (a nitro function) to call when this animation is done. More... | |
Static Public Attributes | |
static AnimatedProperty | LastProperty |
Actively animated properties are stored in a linked list. This is the tail of that list. More... | |
static AnimatedProperty | FirstProperty |
Actively animated properties are stored in a linked list. This is the head of that list. More... | |
Properties | |
float | TotalTime [get] |
The total time in seconds that this animation lasts for. More... | |
Private Member Functions | |
void | Setup (Element animating, Style style, float duration, Blaze.VectorPath timeCurve) |
Sets up general information for a particular animation and starts running it. More... | |
void | AnimateTransform (Css.Value value) |
Special case when animating CSS transform. More... | |
void | Animate (CssProperty property, Css.Value value, bool updateCss) |
Starts animating the named property and target value. More... | |
Private Attributes | |
bool | FinishedPlaying |
True if this animation has finished; false otherwise. More... | |
|
inline |
Creates a new UIAnimation for animating CSS and immediately animates it. See PowerUI.HtmlElement.animate.
animating | The element being animated. |
properties | The CSS property string. Each property should define the value it will be when the animation is done. |
duration | How long this animation lasts for. |
timeCurve | A curve used to describe animation progression. |
|
inline |
Creates an animation with the given style as the set of target properties.
|
inlineprivate |
Starts animating the named property and target value.
property | The property to update. May be an alias or composite. |
value | The target value of the property. |
updateCss | True if this property should update CSS/ the screen when it's progressed. |
|
inlineprivate |
Special case when animating CSS transform.
|
inlinestatic |
Removes all active animations.
|
inline |
Called when this animation is finished.
|
inlinestatic |
Searches the current animated properties for the named property on the given element.
animating | The element being animated. |
property | The CSS property to look for. Note: Must not be a composite property such as color-overlay. Must be a full property such as color-overlay-r. |
|
inlinestatic |
Searches the current animated properties for the named property on the given element.
animating | The element being animated. |
property | The CSS property to look for. |
|
inline |
Calls the given function when the animation is over.
|
inline |
Calls the given delegate when the animation is over.
|
inlineprivate |
Sets up general information for a particular animation and starts running it.
|
inline |
Call this to halt the animation early. This internally will cause the finished event to run.
|
inline |
Call this to halt the animation early.
runEvent | Optionally run the finished event if there is one. |
|
inlinestatic |
Called at the UI update rate to progress the currently animated properties.
Element PowerUI.UIAnimation.Animating |
The element being animated.
ComputedStyle PowerUI.UIAnimation.ComputedStyle |
The CS for the element being animated.
object PowerUI.UIAnimation.Data |
A custom data object.
DynamicMethod<Nitro.Void> PowerUI.UIAnimation.Done |
The dynamic method (a nitro function) to call when this animation is done.
float PowerUI.UIAnimation.Duration |
The time in seconds that the animation will run for.
|
private |
True if this animation has finished; false otherwise.
|
static |
Actively animated properties are stored in a linked list. This is the head of that list.
|
static |
Actively animated properties are stored in a linked list. This is the tail of that list.
UIAnimation PowerUI.UIAnimation.NextAnimation |
All current animations are stored in a linked list. This is the next one.
AnimationCompleted PowerUI.UIAnimation.OnComplete |
The method to call (a c# or JS method) when the animation is done playing.
bool PowerUI.UIAnimation.Paused |
True if this animation is paused.
Blaze.VectorPath PowerUI.UIAnimation.TimeCurve |
A curve which describes the progression of the animation. x is time, y is value. Usually (0,0) to (1,1).
|
get |
The total time in seconds that this animation lasts for.