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
Array each (Array arr, Function callBack)
runs a functions trou each of the elements of an array
String getCustomProp (Object el, String prop, Boolean keep)
get the value of a custom property from a DOM element
Function getEasing (String easing)
Returns a easing function
Checks for the existence of CSS transition support
String interpolate (Number source, Number target, Number pos)
Interpolates target and source values based on time position
parallel (Array arrEffects, Object options)
- runs an array of effects in parallel
setCustomProp (Object el, String prop, String val)
set the value of a custom property on a given DOM element

Constructor Details

constructor Core

Core()

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

Array each(Array arr, Function callBack)
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

String getCustomProp(Object el, String prop, Boolean keep)
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

setCustomProp(Object el, String prop, String val)
set the value of a custom property on a given DOM element
Parameters:
el - target element
prop - property name
val - property value