Jump to content
Search Community

Image sequence loop

Shanda test
Moderator Tag

Recommended Posts

You can create a standalone ScrollTrigger, using whatever element you want for your trigger, and then use a callback like onEnter or onToggle to start playing the animation. 

 

So something like this. Just adjust the animation how you like.  

 

let animation = gsap.to(clubbys, {
  frame: frameCount - 1,
  snap: "frame",
  paused: true,
  repeat: -1,
  yoyo: true,
  ease: "none",
  duration: 2,
  onUpdate: render // use animation onUpdate instead of scrollTrigger's onUpdate
});

ScrollTrigger.create({
  trigger: ".my-trigger",
  onEnter() {
    animation.play()
  }
});

 

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...