CSSAnimation Class
Animates CSS for a given element (constructor throws Direction error).
Constructor
CSSAnimation
(
Void
-
props
Parameters:
-
propsObjectproperties to animate:
-
targetElHTMLElementthe element to animate
-
cssPropertyStringa CSS property, e.g. opacity, top
-
cssUnitStringa CSS 'length' unit, e.g. px
-
minValueIntthe minimum of the range of values to change
-
maxValueIntthe maximum of the range of values to change
-
directionStringup | down (min to max | max to min)
-
durationFloathow long the animation lasts in seconds
-
fpsFloatframes per second
-
transitionTypeIntpre-defined constants: CSSAnimationLinearTransition | CSSAnimationEaseTransition | CSSAnimationEaseInOutTransition
-
lambdaPowerFloatexponent for easing: in > 1, out < 1, default 2
-
Returns:
Void:
Item Index
Methods
Properties
- EASE_IN_OUT_TRANSITION static
- EASE_TRANSITION static
- LINEAR_TRANSITION static
Methods
_interpolate
()
Float
protected
Calculates the difference between each frame's animation value.
Returns:
Float:
animate
()
Void
Performs the animation.
Returns:
Void:
Properties
EASE_IN_OUT_TRANSITION
Int
final
static
Transition type.
EASE_TRANSITION
Int
final
static
Transition type.
LINEAR_TRANSITION
Int
final
static
Transition type.
