Unfortunately this doesn't really solve my problems, when I need to play a rather complex timeline at somepoint after a barba-transition.
I also found that when I put the timeline as well as the command to play that timeline into the same function like this...
function fireThisAfterTransition() {
var scrollIndicationAnimation = gsap.timeline({ paused: true, reversed: true, force3D:true });
scrollIndicationAnimation
.set('.scroll-indicator-main', { transformOrigin: "50% 0%" })
.to('.scroll-indicator-main', { duration: 1.5, scaleY: 1, ease: "expo.inOut" })
.set('.scroll-indicator-main', { transformOrigin: "50% 100%" })
.to('.scroll-indicator-main', { duration: 1.5, scaleY: 0, ease: "expo.inOut", onComplete:function(){
console.log ('Look, this is being executed...')
} })
.set('.scroll-indicator-main', { transformOrigin: "50% 0%" })
;
scrollIndicationAnimation.play();
}
... and call that function after the barba-transition has ended, it works and the timeline will be animated.
But this lacks the possibility to really control the timeline when I need to.
Is it possible that the way barba works at this point, it is not compliant with the way GSAP's timelines are made up?