class
SAPO.Effects.Core
Defined in
Effects/Core/0.1/lib.js
Constructor Summary
Core()
Function Summary
animate
(Function
cb, Number
dur, Number
from, Number
to, Function
before, Function
after, Function
easing)
Fire the animation
get the value of a custom property from a DOM element
Checks for the existence of CSS transition support
Interpolates target and source values based on time position
set the value of a custom property on a given DOM element
Function Details
function animate
animate(Function
cb, Number
dur, Number
from, Number
to, Function
before, Function
after, Function
easing)
Fire the animation
Parameters:
cb
- callback to execute at each animation
cycle. Receives position in time (float value from 0 to 1) as a parameter
dur
- animation duration in milliseconds
from
- source value
to
- target value
before
- callback executed before the animation
after
- callback executed after the animation
easing
- easing function or function name function each
runs a functions trou each of the elements of an array
Parameters:
arr
callBack
- the function recieves as arguments value, index and array function getCustomProp
get the value of a custom property from a DOM element
Parameters:
el
- target element
prop
- property name
keep
- if false, deletes the property from the element
Returns:
value of a given property
function getEasing
Function
getEasing(String
easing)
Returns a easing function
Parameters:
easing
- name of the easing function function getTransitionProperties
String
getTransitionProperties()
Checks for the existence of CSS transition support
Returns:
Proprietary CSS prefix for the current browser. False if transitions are not supported.
function interpolate
String
interpolate(Number
source, Number
target, Number
pos)
Interpolates target and source values based on time position
Parameters:
source
- source value
target
- target value
pos
- current time position
Returns:
Interpolated value
function parallel
parallel(Array
arrEffects, Object
options)
- runs an array of effects in parallel
Parameters:
arrEffects
options
function setCustomProp
set the value of a custom property on a given DOM element
Parameters:
el
- target element
prop
- property name
val
- property value