Eases using a sine wave that starts slowly and then accelerates over time.
Copyright 2012, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for corporate Club GreenSock members, the software agreement that was issued with the corporate membership.
public static var ease:ElasticIn
The default ease instance which can be reused many times in various tweens in order to conserve memory and improve performance slightly compared to creating a new instance each time.
public function ElasticIn(amplitude:Number = 0, period:Number = 0)
Constructor
Parameters
| amplitude:Number (default = 0 ) — the amplitude of the sine wave (how exaggerated its movement is). Default is 0.
|
|
| period:Number (default = 0 ) — the period of the sine wave (how far apart its waves are spaced, like its frequency). Default is 0.
|
public function config(amplitude:Number = 0, period:Number = 0):ElasticIn
Permits customization of the ease with various parameters.
Parameters
| amplitude:Number (default = 0 ) — the amplitude of the sine wave (how exaggerated its movement is). Default is 0.
|
|
| period:Number (default = 0 ) — the period of the sine wave (how far apart its waves are spaced, like its frequency). Default is 0.
|
Returns
| ElasticIn —
new ElasticIn instance that is configured according to the parameters provided
|
public override function getRatio(p:Number):Number
Translates the tween's progress ratio into the corresponding ease ratio. This is the heart of the Ease, where it does all its work.
Parameters
| p:Number — progress ratio (a value between 0 and 1 indicating the progress of the tween/ease)
|
Returns
| Number — translated number
|