Jump to content
Search Community

Animate in ms within a scroll-bound timeline (GSAP + SM)

sashaikevich test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I'm  using scrollmagic to trigger some tweens, but one of the sequences on my timeline I would like to unbind from the scroll speed, and instead animate in miliseconds. 

I read the solution in another topic - to just create a new trigger, but my elements are off-screen, part of a horizontal animation. 

What would be a smart way to triggering it?

 

I made a simple demo - I would like to have the 3 elements near the end spin for Xms, instead of their current scroll-bound rotation. Any ideas?

(Note, this is not the final animation - I plan to add many more scroll-based animations to the timeline after it)

 

Thanks!

See the Pen MNbrMz by sashaikevich (@sashaikevich) on CodePen

Link to comment
Share on other sites

I'd probably just use one of the ScrollMagic event handlers. You could rotate those objects with a separate tween or timeline and call that tween with a scene end event handler or maybe fire it when the scene reaches a certain progress point. You could also just use a separate trigger.

 

Keep in mind that ScrollMagic is not a GreenSock product. 

 

Check out the event docs here:

http://scrollmagic.io/docs/ScrollMagic.Scene.html#event:end

 

Happy tweening.

  • Like 1
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...