Jump to content
Search Community

donrusvlad

Members
  • Posts

    12
  • Joined

  • Last visited

Posts posted by donrusvlad

  1. 13 minutes ago, OSUblake said:

    However, you can export a function to return a timeline.

    export function fade() {
      return gsap.timeline().fade(...)
    }

     

    Then in main.js...

    scrollTimeline.add([fade(), ...])

    Thanks, that is the solution. I see that I should create several timelines, not use one timeline several times.

    • Like 1
  2. I wouldn't like to import effects to the main.js

    I would like to import them in first.js file. Then I make all animations in this file. After that I export all these animations to main.js file and add them to scrollTimeline

     

    I understand the point about timeline creation, but how can I use the same timeline with scrollTrigger multiple times. May be I should use some timeline controls methods or something.

  3. @OSUblake Thanks for quick reply. I see what you mean, but I created separate file for each component and implemented animation there. Then I imported those components in main.js and created ScrollTrigger animation. Everything works fine except those animations that added to scrollTimeline several times.

  4. Hi. I have an issue with multiple .fromTo() tweens that concerns one element.

    Could you help to find out what is the reason of unevident behavior.

    I need to implement such functionality:

    1. All section unfaded at start point

    2. All faded except first section

    3. All unfaded

    4. All faded except second section

    5. All unfaded

    ...

    10. All unfaded

    Here is the demo 

    See the Pen OJxjpGr by donrus (@donrus) on CodePen

×
×
  • Create New...