animatePaper Class
Item Index
Methods
Methods
animate
()
chainable
The main animation interface. It can take a single option object or an array of option objects if you want to chain animations without falling into Callback Hell.
extendEasing
-
customEasings
Use this method to extend the private Easing collection.
The customEasings
object should like this :
{
"easingName": function(p) { easing algorithm }
}
When used, easing functions are passed the following arguments :
percent
percent * duration
Easing functions are obviously expected to return the eased percent.
Parameters:
-
customEasings
ObjectA collection of easing functions
extendPropHooks
-
customHooks
Use this method to extend _tweenPropHooks.
The customHooks
object should like this :
{
"propertyName": {
set: function() {},
get: function() {},
ease: function() {}
}
}
Each hook can contain a get
, set
and ease
functions. When these functions are used, they are passed only
one argument : the Tween object, exept for the ease()
function which gets the eased percent
as second parameter.
- The
get()
function must return the current value of theTween.item
's property. - The
set()
function must set the value of theTween.item
's property withTween.now
(which will most likely be the result ofget()
orease()
) - The
ease()
function must return the eased value. The second parameter is the eased percent.
Parameters:
-
customHooks
ObjectA collection of objects
stop
()
chainable
Stops all animations on the item. If goToEnd
is true
,
the animated properties will be set to their final values.