CSSAnimation Class
Animates CSS for a given element (constructor throws Direction error).
Constructor
CSSAnimation
(
Void
-
props
Parameters:
-
props
Objectproperties to animate:
-
targetEl
HTMLElementthe element to animate
-
cssProperty
Stringa CSS property, e.g. opacity, top
-
cssUnit
Stringa CSS 'length' unit, e.g. px
-
minValue
Intthe minimum of the range of values to change
-
maxValue
Intthe maximum of the range of values to change
-
direction
Stringup | down (min to max | max to min)
-
duration
Floathow long the animation lasts in seconds
-
fps
Floatframes per second
-
transitionType
Intpre-defined constants: CSSAnimationLinearTransition | CSSAnimationEaseTransition | CSSAnimationEaseInOutTransition
-
lambdaPower
Floatexponent 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.