Jump to content
Search Community

Static effects on enter timeline

artstyle test
Moderator Tag

Recommended Posts

Hello. please look at the section

it has a timeline like this 

    let s2_tl = gsap.timeline ({
    scrollTrigger: {
    trigger: ".s2",
    start: "top top",
    end: "bottom top",
    scrub: 1.5,
    pin: true,
    toggleActions: "play reverse play reverse",
    }
    });
    s2_tl
    .to(".triangle",{rotate: 333});

but what if i want to add this effects on enter, how it should look like? i want to apply them onenter and remove onleave .s2 section

    .from(".section2-text2",{x: -500,opacity: 0,duration: 1.5,ease: "expo.inOut"})
    .from(".section2-heading",{x:-300,opacity: 0,duration: 1.5,ease: "expo.inOut"},"<")
    .from(".s2-img1",{x:1000,opacity: 0,duration: 1,ease: "expo.inOut" },"<")
    .from(".s2-img2",{x:1000,opacity:0,duration: 1,ease: "expo.inOut" },"<")
    .from(".triangle",{opacity:0,duration:0.5,delay:0.5,ease: "expo.inOut" },"<");

See the Pen mdPLMLx by aptypkaa (@aptypkaa) on CodePen

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...