Jump to content
Search Community

benjaminben

Premium
  • Posts

    4
  • Joined

  • Last visited

Posts posted by benjaminben

  1. Is there a way to tween a timeline beyond its duration in an infinite loop? Take the following example:

     

    const tl = gsap.timeline({ paused: true })
    
    tl.set(thing, { x: 0 })
    tl.to(thing, { x: 100 })
    
    gsap.to(tl, { progress: 0.5 }) // X will arrive at 50
    gsap.to(tl, { progress: 1 }) // X will arrive at 100
    gsap.to(tl, { progress: 1.5 }) // But can we make X arrive at 50 again by looping around??

    See the Pen WNJmjxj by benjaminben (@benjaminben) on CodePen

×
×
  • Create New...