API Docs for: 1.0.0
Show:

CSSAnimation Class

Defined in: css_animation.js:4
Module: CSSAnimation

Animates CSS for a given element (constructor throws Direction error).

Constructor

CSSAnimation

(
  • props
)
Void

Defined in css_animation.js:4

Parameters:

  • props Object

    properties to animate:

    • targetEl HTMLElement

      the element to animate

    • cssProperty String

      a CSS property, e.g. opacity, top

    • cssUnit String

      a CSS 'length' unit, e.g. px

    • minValue Int

      the minimum of the range of values to change

    • maxValue Int

      the maximum of the range of values to change

    • direction String

      up | down (min to max | max to min)

    • duration Float

      how long the animation lasts in seconds

    • fps Float

      frames per second

    • transitionType Int

      pre-defined constants: CSSAnimationLinearTransition | CSSAnimationEaseTransition | CSSAnimationEaseInOutTransition

    • lambdaPower Float

      exponent for easing: in > 1, out < 1, default 2

Returns:

Void:

Item Index

Properties

Methods

_interpolate

() Float protected

Defined in css_animation.js:87

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

Defined in css_animation.js:78

Transition type.

EASE_TRANSITION

Int final static

Defined in css_animation.js:69

Transition type.

LINEAR_TRANSITION

Int final static

Defined in css_animation.js:60

Transition type.