I have an infintie scrolling stack (actually its only 4 items looping) - and it's made up of a bunch of tweens, designed to seamless loop from progress 0-1, 0-1,0-1 and so on.
So if I use
tl = new TimelineMax({repeat:20});
It will play seamless.
Eventually I want to swipe the stack and it just rolls continuesly until it has lost momentum... (think mobile browser scrolling - where you flick your thumb and it scrolls ahead smoothly)
So I paused the timeline and test with a tweening.
For instance I want to move the stack 8 positions (that is moving twice through the stack of 4 items) - and since I timed each stack move with a second it would be:
TweenLite.to(tl, 1, {progress:8});
Naturally it wont tween progress beyond 1.
Naively I briefly thought:
TweenLite.to(tl, 1, {progress:8 % 1, ease:Expo.easeOut});
would work. But of course not - it isnt moving throught the stack twice
So my question is is there a way of looping progress?
I am thinking of doing the "progress modulu way" in an onUpdate. But I feel it isn't right tweening a vairable and using it in onUpdate - and won't it hurt performance?
or I could use
tl = new TimelineMax({repeat:20000});
and just tween the totalProgress or totalTime (if possible?)
But is there a better and more propper way?
TIA!