Is it possible to target a specific tween in a timeline and not have it go in reverse when the timeline's progress is going from 1 to 0?
function createTimeline(progress, ...elems) {
let tl = new TimelineMax({ paused: true });
tl.add('beginning')
.fromTo(elems[0], 1, { x: '-100%' }, { x: '0%', ease: Power0.easeNone })
.fromTo(elems[1], 1, { y: '100%' }, { y: '0%', ease: Power0.easeNone }, 'beginning')
.add('middle')
.fromTo(elems[0], 1, { x: '0%' }, { x: '100%', ease: Power0.easeNone, immediateRender: false })
.fromTo(elems[1], 1, { y: '0%' }, { y: '-100%', ease: Power0.easeNone, immediateRender: false }, 'middle')
.add('end')
.progress(progress);
return tl;
}
I am using a dragging/swiping callback to control the progress of my timelines, but I'd like to, regardless of the direction of the progress, have the tweens associated with elems[1] to always go from y:'100%' -> y:'0%' -> y:'-100%'. Right now, if the progress is going from 1 to 0, the tweens associated with elems[1] go from y:'-100%' -> y:'0%' -> y:'100%', which makes sense, but it's not what I'm looking for.
I can make a CodePen if that would help.
Thank you!
EDIT
Heres a CodePen:
http://codepen.io/TrevorRice/pen/YGbyvv/?editors=1010