OswaldoV Posted February 9, 2020 Posted February 9, 2020 I did this a few weeks ago and was working fine but today just first timeline is working, the others not, I check previous versions on git and are not working neither var tlstart = gsap.timeline(); var tlBg = gsap.timeline({onUpdate:updatePercentage}); var tl = gsap.timeline(); var tl2 = gsap.timeline(); var tl3 = gsap.timeline(); const controller = new ScrollMagic.Controller(); tlstart.to("#background", 1, {opacity:1}, "+=.3") .from("nav", .4, { y: "+=10"}, "-=.6") .from(".anim1", .8, {opacity:0, x:-200, stagger: .4}) .from(".sectionProjects", .2, {opacity:0, y:10}, "-=1"); tlBg.to("#background", .2, {opacity:0}); tl.from(".anim2", .5, {opacity: 0, x:"-=200", stagger:.2}) .from(".projectThumb1", .4, {opacity:0, x:"+=20"}, "-=.6"); tl2.from(".anim3", .5, {opacity: 0, x:"+=50", stagger:.2}) .from(".projectThumb2", .4, {opacity:0, x:"-=20"}, "-=.6"); tl3.from(".anim4",.5, {opacity:0, y: "-=10", stagger: .2}); const sceneBg = new ScrollMagic.Scene({ triggerElement: "#background", triggerHook: "onLeave", duration: "90%" }) .setPin("#background") .setTween(tlBg) .addTo(controller); const scene = new ScrollMagic.Scene({ triggerElement: "#trigger1" }) .setTween(tl) .addTo(controller); const scene2 = new ScrollMagic.Scene({ triggerElement: "#trigger2" }) .setTween(tl2) .addTo(controller); const scene3 = new ScrollMagic.Scene({ triggerElement: "#trigger3" }) .setTween(tl3) .addTo(controller);
ZachSaucier Posted February 10, 2020 Posted February 10, 2020 Hey Oswaldo and welcome to the GreenSock forums! Could you please provide a minimal demo of the problematic code? That means stripping anything that isn't directly related to the error. Using something like CodePen is very helpful as well. You can read more about how to do so here: Also know that ScrollMagic is not a GreenSock product and we don't really support it here. We may or may not be able to help in regards to getting it working
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now