Jump to content
Search Community

Starting animation scroll both sides

JukaChu test
Moderator Tag

Recommended Posts

Hi all. I am new with Gsap and ScrollMagic. 
And i have question. How to trigger not reversed animation, with trigger block, when scroll down or when o scroll up. 
Situation: i scroll my page down, see trigger, animation is ended. I am on footer of the page, refresh page and start scroll up, but all animation is on end position. So, how to trigger with scroll both sides, from start trigger element (if you scroll down) and end of element (if you scroll up)?
Thanks.
And sorry for my english) 

See the Pen LYbGBjg by jukachu (@jukachu) on CodePen

Link to comment
Share on other sites

 

Hey @JukaChu - welcome to the forums.

 

ScrollMagic is not a GreenSock product and thus not really supported in these forums.

GreenSock has its own plugin for scroll-driven animations: ScrollTrigger

 

It is better than ScrollMagic in every way, easy to understand and will be maintained for a long time - unlike ScrollMagic.

If you need further assistance on this, you should probably use that instead of ScrollMagic.

 

The docs are a great point to get started.

 

What could be of interest with regard to your question:

ScrollTrigger has a nifty toggleActions option that makes it easy to declare how to play an animation on enter/leave/enterBack and leaveBack.

 

Cheers,

Paul

 

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