Jump to content

GreenSock Docs (HTML5/JS)



.SlowMo( linearRatio:Number, power:Number, yoyoMode:Boolean ) ;



linearRatio: Number

(default = 0.7) — the proportion of the ease during which the rate of change will be linear (steady pace). This should be a number between 0 and 1. For example, 0.5 would be half, so the first 25% of the ease would be easing out (decelerating), then 50% would be linear, then the final 25% would be easing in (accelerating). If you choose 0.8, that would mean 80% of the ease would be linear, leaving 10% on each end to ease. The default is 0.7.

power: Number

(default = 0.7) — The strength of the ease at each end. If you define a value above 1, it will actually reverse the linear portion in the middle which can create interesting effects. The default is 0.7.

yoyoMode: Boolean

(default = false) — If true, the ease will reach its destination value mid-tween and maintain it during the entire linear mode and then go back to the original value at the end (like a yoyo of sorts). This can be very useful if, for example, you want the alpha (or some other property) of some text to fade at the front end of a SlowMo positional ease and then back down again at the end of that positional SlowMo tween. Otherwise you would need to create separate tweens for the beginning and ending fades that match up with that positional tween. Example: TweenLite.to(myText, 5, {x:600, ease:SlowMo.ease.config(0.7, 0.7, false)}); TweenLite.from(myText, 5, {alpha:0, ease:SlowMo.ease.config(0.7, 0.7, true)});



Copyright 2017, GreenSock. All rights reserved. This work is subject to theterms of useor for Club GreenSock members, the software agreement that was issued with the membership.