Jump to content
Search Community

Giovanni Ciriello

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by Giovanni Ciriello

  1. 11 minutes ago, _Greg _ said:

    Hi! if i understand you, you want change opacity from 100 to 0 when scroll from 0 to 100vh? 

    speed = distance / time

    You can't change time of scrolling but you can change distance

     

    The opacity goes to 0 to 1. I just want that, after this animation, further scrolling does not start the following animation soon, but after a bit of scrolling.

  2. 14 minutes ago, Shaun Gorneau said:

    There's a few ways you can do it ...

     

    If part of a timeline, give that tween a longer duration. You could also affect the timescale ... but, without more information, I think a longer duration would be a better fit. Another option is to define an end value that is over a large pixel (or a calculated) value.


    OK maybe a code snipped would help..
     

        gsap.timeline({
          scrollTrigger: {
            trigger: this.aperitifSection.nativeElement,
            scrub: true,
            pin: true
          }
        })
          .to(this.aperitifBg.nativeElement, { opacity: 1 }) // <!-- this is an animated background. After this I want the user scroll enjoing for some time this animation
          .to(this.aperitifImg.nativeElement, { top: "100vh" })

    how could I modify the code?

×
×
  • Create New...