Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Mauro.ie31

Timeline with ScrollTrigger issue

Go to solution Solved by Mauro.ie31,

Recommended Posts

Hello everyone,

I have have a timeline controlled with ScrollTrigger and inside I have some labels.

So I have some methods that do a tweenFromTo from one label to another, but then of course If I start scrolling again I restart from the last ScrollTrigger progress.

Is it possible to update the scrollTrigger progress value to the actual timeline time that occurs at the end of tweenFromTo?

Recap:

I have a timeline.

Timeline is controlled with ScrollTrigger.

Timeline has 3 different labels (label1, label2, label3).

If i do timeline.tweenFromTo("label1", "label2") everything is fine.

But then if I restart scrolling i restart from the last ScrollTrigger progress value.

Is it possible to update the timeline.ScrollTrigger value so If i Scroll I start from the end of timeline.tweenFromTo("label1", "label2")?

Thanks

 

Link to comment
Share on other sites

I'm unsing ScrollToPlugin.

So I have a timeline with different labels.

Is it possible to scroll to the actual label position??

I set up a method:
timelinePlanets is my timeline.

   function scrollToLabel(labelName){
        const pos = Math.ceil(document.body.scrollHeight * (timeLinePlanets.labels[labelName] / timeLinePlanets.duration()) )
        TweenMax.to(window, { duration: 2scrollTo: posease: 'power1.inOut' })
    }
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.
×