Tween#easing()

easing(ease, index) → {Phaser.Tween}

Set easing function this tween will use, i.e. Phaser.Easing.Linear.None.
The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ".
".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types.
If you have child tweens and pass -1 as the index value it sets the easing function defined here across all of them.

Parameters
Name Type Argument Default Description
ease function | string

The easing function this tween will use, i.e. Phaser.Easing.Linear.None.

index number <optional>
0

If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the easing function on all children.

Returns

This tween. Useful for method chaining.

Source code: tween/Tween.js (Line 504)
doc_phaser
2017-02-14 11:18:31
Comments
Leave a Comment

Please login to continue.