Constructor
new CCSSAnimation(cssRule)
Parameters:
Name | Type | Description |
---|---|---|
cssRule |
CSSKeyframesRule | The associated CSSRule we're constructing this from (i.e., the relevant @keyframes bit) |
- Source:
Extends
Members
currTime
The time when this animation started playing.
- Overrides:
- Source:
duration :number
How long the animation will last for. Set in module:animationmanager~CCSSAnimation#initPlay.
Type:
- number
- Source:
elements
The elements this animation is influencing. Set in module:animationmanager~CCSSAnimation#initPlay.
- Source:
globalParent :string
What animation this belongs to.
Type:
- string
- Overrides:
- Source:
name :string
The animation name.
Type:
- string
- Overrides:
- 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.
- Overrides:
- Source:
options
The options inherited from the parent module:animationmanager~CCSSAnimationBase, ultimately created by module:animationmanager~CCSSGlobalAnimation#playKeyframedAnimation.
- Overrides:
- Source:
playStack
A stack of all the keyframes to play one after the other.
- Overrides:
- Source:
timeline :Map:.<number:, {animations:: Array:.<CCSSAnimationBase:>, fraction:: number:}>
A map of all the keyframes at the time that they will play it, by a percentage (from 0 to 100).
Type:
- Overrides:
- Source:
Methods
clearAnimation()
We keep animations so that CSS info can persist after something happens. Call this only after you want to stop ALL animations.
Should probably be static.
- Source:
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 |
- Overrides:
- 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. |
- Overrides:
- Source:
Returns:
Animations is the result of (or an object in the shape of the result of) module:animationmanager~CCSSAnimationBase#readToAnimStore.
- Type
- Object
genProps(animationObj, element)
Called by module:animationmanager~CCSSAnimation#initPlay. This should probably be a static function.
Parameters:
Name | Type | Description |
---|---|---|
animationObj |
Object:.<string:, Object:> | Animation object. Ultimately generated by module:animationmanager~CCSSAnimationBase#frameUpdate. |
element |
HTMLElement | An element that this animation is attached to. |
- Source:
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 |
- Overrides:
- 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 |
- Overrides:
- Source:
Returns:
Store of all frame animation values.