Animated Gradient
Animated Gradient create a constantly moving background gradient.
How to Initialize the Animated Gradient ?
The initialization of the flip animation is an one step process, just call the function Init of the class with its one argument (see bellow for more details)
Class Details
Functions:
Initialization and main functions:
Name |
Arguments |
Return |
Description |
Init |
|
VOID |
This function Initialized id member; Note: EE function: AddGradient() will always Initialize the class before return it. |
Launch |
|
VOID |
This function will create the Interval loop for the animation by calculating time ratio and shift for each frame, this function can stop prematurely if some condition are not filled. Important: Make sure you use Setters Functions first. |
Stop |
NONE |
VOID |
Call to stop the animation. |
Setters functions:
Name |
Arguments |
Return |
Description |
AddColor |
|
VOID |
This function Initialized id member; |
SetLastFirstDistance |
|
VOID |
Used this function to specify the distance between the last color (at 100%) and the first (at 0%). |
SetCallback |
|
VOID |
Add callback called at each frames. |
Private Details
All private details are usable but its recommended to not use any of those. It might modify the proper functioning of the class.
Variables (Members):
Name |
Type |
Default Value |
Description |
id |
String |
null |
Target DOM ID. |
colors |
Class []:
|
[] |
List of colors and position used by the Update function. |
shift |
Float |
0 |
Hold the gradient shift animation calculated by the launch function. |
LastFirstDist |
50 |
Distance it take to reach the first color from the last, in %. |
|
Animation |
null |
Hold JQuery Interval id, to cancel it when stop function is called. |
|
CallbackFunc |
Function |
null |
Hold the callback function called each frame. |
Functions:
Name |
Arguments |
Return |
Description |
Update |
|
None |
This function will increment and update the gradient. |
Compatibility
LANGUAGE CLASS: Not compatible.
Created with the Personal Edition of HelpNDoc: Easy to use tool to create HTML Help files and Help web sites