Class: CCSSAnimationBase

animationmanager~CCSSAnimationBase(cssRule)

Base for all animations.

Constructor

new CCSSAnimationBase(cssRule)

Parameters:
Name Type Description
cssRule CSSRule The associated CSSRule we're constructing this from (i.e., the relevant @keyframes bit)
Source:

Members

currTime

The time when this animation started playing.
Source:

globalParent :string

What animation this belongs to.
Type:
  • string
Source:

name :string

The animation name.
Type:
  • string
Source:

nextTimeOffset

If the animation is playing but needs to be delayed for a certain amount of time, how much time (in ms) we should wait. Not set in this class, but in its descendants.
Source:

options

The options inherited from the parent module:animationmanager~CCSSAnimationBase, ultimately created by module:animationmanager~CCSSGlobalAnimation#playKeyframedAnimation.
Source:

playStack

A stack of all the keyframes to play one after the other.
Source:

timeline :Map:.<number:, {animations:: Array:.<CCSSAnimationBase:>, some_store:: number:}>

A map of all the keyframes by the time that they will play at. Uses a map to guarantee insertion order. some_store is actually not set here. Rather, it will either be "index" or "percent", depending on the descendant.
Type:
  • Map:.<number:, {animations:: Array:.<CCSSAnimationBase:>, some_store:: number:}>
Source:

Methods

evaluateCCSSAnimProp(animProp) → {Object}

Called exclusively by module:animationmanager~CCSSAnimationBase#readToAnimStore for reading an animation property and getting data.
Parameters:
Name Type Description
animProp string Property value for animation
Source:
Returns:
An object containing animation data.
Type
Object

frameUpdate(totalPlayTime, nextTime) → {Object}

Parameters:
Name Type Description
totalPlayTime number Total duration this animation has been playing for.
nextTime number The time the next keyframe will start.
Source:
Returns:
Animations is the result of (or an object in the shape of the result of) module:animationmanager~CCSSAnimationBase#readToAnimStore.
Type
Object

initPlay(time, options)

Starts playing the animation.
Parameters:
Name Type Description
time number The time from module:animationmanager~AnimationManager#frameUpdate.
options Object:.<string:, Object:> A set of options inherited from the parent module:animationmanager~CCSSAnimationBase, ultimately created by module:animationmanager~CCSSGlobalAnimation#playKeyframedAnimation
Source:

readToAnimStore(frame) → {Object:.<string:, {animName:: string:, duration:: number:, selectors:: Array:.<string:>}>}

Reads a CSSKeyframeRule and stores all the relevant CCSS Information (like variable and timing information from --ANIM- variables) to a store.
Parameters:
Name Type Description
frame CSSKeyframeRule
Source:
Returns:
Store of all frame animation values.
Type
Object:.<string:, {animName:: string:, duration:: number:, selectors:: Array:.<string:>}>