Posting this for future Google searchers:
To slow down a repeating animation in GSAP so it seems like it's losing momentum until it reaches the end position, animate both the 'timeScale' and 'progress' properties! Thanks to zadvorsky and zachsaucier for their help.
var spin = TweenMax.to('#group',2,{
transformOrigin: 'center center',
rotation: 360,
ease: 'Linear.easeNone',
repeat: -1,
paused: true
});
document.getElementById('finish').addEventListener('click',function(){
var remaining = spin.timeScale() * ( spin.duration() - spin.time() ) * 3;
TweenMax.to(spin, remaining, {
timeScale: 0,
ease: 'Linear.easeNone',
onComplete: function(){ spin.pause(); }
},0);
TweenMax.to(spin, remaining, {
progress: 1,
ease: 'Power3.easeOut',
},0);
});
I haven't figured out a better way to calculate how long the slow-down animation should last. "spin.timeScale() * ( spin.duration() - spin.time() ) * 3" feels right for this animation, but three is a bit of a magic number. Any ideas on how to better calculate that?