Tween Class
Tween class. TODO : figure out a way to add support for extra arguments to pass to the Tweens (like for rotate() )
Constructor
Tween
-
Property
-
Final
-
animation
Parameters:
-
Property
Stringname
-
Final
Mixedvalue
-
animation
Object
Methods
_pointDiff
-
a
-
b
-
operator
Performs an operation on two paper.Point() objects.
Returns the result of : a operator b
.
Parameters:
-
a
Objecta
paper.Point
object -
b
Objecta
paper.Point
object -
operator
Stringeither
+
or-
Returns:
{x: (a.x operator b.x), y: (a.y operator b.y)}
cur
()
Mixed
Get the current value of the animated property. Uses _tweenPropHooks if available.
Returns:
Current value
run
-
percent
Called on each tick. Set the value of the property to the eased value. Uses _tweenPropHooks if available. It takes the percentage of the animation duration as argument.
Parameters:
-
percent
Number
Returns:
self
Properties
direction
String
If the value of the property increases, direction
will be '+'
, if it decreases : '-'
.
end
Mixed
The value the property will have when the animation is over.
item
Object
Animated paper.Item
object
prop
String
Name of the animated property