RelativePlugin Class
The RelativePlugin for TweenJS enables relative numeric values for tweens. Install using:
RelativePlugin.install();
Once installed, you can pass in relative numeric property values as strings beginning with "+" or "-". For example,
the following tween would tween the x position of foo from its initial value of 200 to 50 (200-150), then to
125 (50+75).
foo.x = 200;
Tween.get(foo).to({x:"-150"}, 500).to({x:"+75"}, 500);
Constructor
RelativePlugin
()
Methods
change
(
Any
static
-
tween -
step -
prop -
value -
ratio -
end
Called before a property is updated by the tween. See change for more info.
Returns:
Any:
init
(
Any
static
-
tween -
prop -
value
Called by TweenJS when a new property initializes on a tween. See init for more info.
Returns:
Any:
install
()
static
Installs this plugin for use with TweenJS. Call this once after TweenJS is loaded to enable this plugin.
Properties
ID
String
static
readonly
READ-ONLY. A unique identifying string for this plugin. Used by TweenJS to ensure duplicate plugins are not installed on a tween.