API Docs for: 0.2
Show:

Tween Class

Defined in: src/tween.js:3

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
)

Defined in src/tween.js:3

Parameters:

  • Property String

    name

  • Final Mixed

    value

  • animation Object

Item Index

Methods

Methods

_pointDiff

(
  • a
  • b
  • operator
)
Object private

Defined in src/prophooks.js:2

Performs an operation on two paper.Point() objects. Returns the result of : a operator b.

Parameters:

  • a Object

    a paper.Point object

  • b Object

    a paper.Point object

  • operator String

    either + or -

Returns:

Object:

{x: (a.x operator b.x), y: (a.y operator b.y)}

cur

() Mixed

Defined in src/tween.js:64

Get the current value of the animated property. Uses _tweenPropHooks if available.

Returns:

Mixed:

Current value

run

(
  • percent
)
Object chainable

Defined in src/tween.js:78

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:

Object:

self

Properties

A

Object

Defined in src/tween.js:15

Reference to the Animation

direction

String

Defined in src/tween.js:55

If the value of the property increases, direction will be '+', if it decreases : '-'.

end

Mixed

Defined in src/tween.js:33

The value the property will have when the animation is over.

item

Object

Defined in src/tween.js:21

Animated paper.Item object

now

Mixed

Defined in src/tween.js:50

Current value of the property. Set using cur

prop

String

Defined in src/tween.js:27

Name of the animated property

start

Mixed

Defined in src/tween.js:39

Value of the property when the animation starts. Set using cur