Jump to content
Search Community

Dan Burns

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Dan Burns

  1. Thank you both @Carl and @Shaun Gorneau.

     

    After reading though documentation I had tried using "tweenTo" but didn't realize that was referencing the nested timeline versus master timeline - thanks for the guidance.

     

    I will make sure to include a CodePen with questions in the future.

     

    // TweenTo(10) = Tweening to time in "TimeLineOne", duration(3) = amount of time in "TimeLineMasterOne"
        .add(TimeLineOne.tweenTo(10).duration(3), 0)

     

    • Like 1
  2. Hello - I'm new to GSAP  - thanks for creating a great tool.

     

    I'm attempting to play a nested timeline (TimeLineOne) a second time with different parameters than the first time it is run. Timeline runs at same duration in both instances. Any guidance would be greatly appreciated.

     

    TweenMax.set(".AnimBox", {opacity:.5});
    
    var TimeLineOne = new TimelineMax({paused: true});
    
    TimeLineOne
        .to(".AnimBox", 1, {y: -100, opacity:1, rotation: 45});
    
    var TimeLineMaster = new TimelineMax({repeat: -1, yoyo: true});
    
    TimeLineMaster
        .add(TimeLineOne.play().duration(8), 0) // Play TimeLineOne animation - length 8 seconds
        .remove(cachedTweens)
        .add(TimeLineOne.reverse().duration(.5), 2)
        .remove(cachedTweens); // At 2 seconds of MasterTimline Play TimeLineOne animation in reverse - length .5 seconds

     

×
×
  • Create New...