Jump to content
Search Community

Sveninyo

Members
  • Posts

    13
  • Joined

  • Last visited

Posts posted by Sveninyo

  1. Hello @iamruletik

    welcome to the GreenSock forum :-)


    To get quick and helpful answers here, I advise you to first create an account on CodePen. Then post your CodePen and describe what you want to do.

     

    Secondly, I would advise you to learn the basics of frontend development (HTML, CSS, JS). If you use tools like Webflow you will get fast results but you will never understand 100% what is going on under the hood.
     

    • Like 1
  2. Hello,

    I have a general question. How can I avoid redundant code (following DRY principles) using GSAP (especially ScrollTrigger)?

     

    For example, the code below works just fine but It repeats 3 times and I don't want that. Isn't it possible to "store" the scrollTrigger information in a variable (since it's always the same) and apply it to the animations? I tried it with ScrollTrigger.create() but that doesn't work.

     

    I'm pretty sure this topic is covered already, I just can't find it. Please just point me to it. I can solve it myself!

     

    Thank you in advance!

     

    gsap.from("#cloud-front", {
        scrollTrigger: {
            trigger: "#rocket-animation",
            scrub: true,
            start: "top 95%",
            end: "top 5%",
            markers: true
        },
        y: 160,
    });
    gsap.from("#cloud-back", {
        scrollTrigger: {
            trigger: "#rocket-animation",
            scrub: true,
            start: "top 95%",
            end: "top 5%",
            markers: true
        },
        y: 80,
    });
    gsap.from("#rocket", {
        scrollTrigger: {
            trigger: "#rocket-animation",
            scrub: true,
            start: "top 95%",
            end: "top 5%",
            markers: true
        },
        y: 240,
    });

  3. Thank you, I will study your pen. I just bought Carls Courses yesterday.
     

    Quote

    just focus on the animation at first and only when you're happy with the animation add ScrollTrigger

    I'll keep that in mind for sure.

     

    Quote

    You rarely need more than one ScrollTrigger to get the desired result.

    I just thought so. Just didn't know any better.

    • Like 1
    • Haha 1
  4. Hello,
    I have made a section reveal effect based on the demo by Zach Saucier (

    See the Pen BaowPwo by GreenSock (@GreenSock) on CodePen

    ). So far everything works fine, however I want to change the background color of each section from black to white as soon as they are revealed. Currently only the first section changes the color. What am I doing wrong? Thank you for your help.

    See the Pen zYMGoYK by Sveninyo (@Sveninyo) on CodePen

  5. Hello,

    I'm new here and I want to learn about GSAP.

     

    With my Wappalyzer browser add-on I've found out that many websites that use GSAP have a "delay/smoothing effect" when scrolled down.

    It's hard to explain, but it feels like the scroll behavior is different than with "normal" websites. To better understand what I mean,

    here's are some links to websites that have this kind of effect.

     

    https://thinkbear.net/ or

     

    https://pureemaison.com/en/ or

     

    https://fleava.com/about

     

    If this question is already answered, please post the link.

    Thank you very much!

    Sven

     

×
×
  • Create New...