Most easing equations give a smooth, gradual transition between the start and end values, but RoughEase provides an easy way to get a rough, jagged effect instead, or you can also get an evenly-spaced back-and-forth movement if you prefer. Configure the RoughEase by passing an object to the constructor or config()
method with any of the following properties (all are optional):
Example code
//use the default values
TweenLite.from(element, 1, {opacity:0, ease:RoughEase.ease});
//or customize the configuration
TweenLite.to(element, 3, {y:300, ease:RoughEase.ease.config({strength:3, points:50, template:Strong.easeInOut, taper:"both", randomize:false}) });
//or create a RoughEase that we can pass in to multiple tweens later
var rough = new RoughEase({strength:3, points:50, template:Strong.easeInOut, taper:"both", randomize:false});
TweenLite.to(element1, 3, {y:300, ease:rough});
TweenLite.to(element2, 5, {x:500, ease:rough});