Jump to content
Search Community

Suffering to Migrate From TweenMax to Gsap 3 ;_;

whizzbbig test
Moderator Tag

Go to solution Solved by nico fonseca,

Recommended Posts

hello, I am using codrops demo Codrops/draggable-image-strip and integrated to my project however i also using gsap.min.js for locomotive scroll,

and as this demo uses tweenmax so it kindof breaks this demo, but when i comment out the cdn of gsap.min.js ( that i integrated in html ) it solves the whole issue.Anyways i went to the guide to migrate from tweenmax to gsap 3 and the things which i understand i manage to migrate and all things got work :) but only the thing wasn't worked is checkTheVideoInReadMe and this also isn't working when i haven't commented gsap.min.js, and when i comment it it works :) please help me to work this thing pullrequest or guide me i am hungry learner i ll be the student of you to learn from you and master gsap i do love animations but i am too noob to use gsap ;_;

imagestrip.js

Link to comment
Share on other sites

  • Solution

Hi @whizzbbig , welcome to the forum 💚 

I downloaded your code and I found the issue. You forgot to change the duration values on the imagestrip.js

For example, in old gsap versions you wrote something like this:

TweenMax.to(element,1,{...})

But now it has to be:

gsap.to(element,{
	duration:1,
	...
})

So you only need to change that :)
PS: I attached the new js file where I changed it in some places so now it works, but you still need to replace it on other places.
 

imagestrip.js

  • Like 5
Link to comment
Share on other sites

Welcome to the forums, @whizzbbig

 

Very happy to see that @nicofonseca offered a solution. 🙌 Hopefully that's all you need, but please be aware that we really can't dig into an entire project that has 550+ lines of JS as well as multiple other 3rd party libraries and diagnose things for you. If you'd like help with a GSAP-specific question, please isolate things into a minimal demo that clearly shows only the problem and doesn't use 3rd party libraries and we'd be glad to take a peek.

 

Good luck with the project!

  • Like 2
Link to comment
Share on other sites

On 8/18/2021 at 1:54 AM, nicofonseca said:

Hi @whizzbbig , welcome to the forum 💚 

I downloaded your code and I found the issue. You forgot to change the duration values on the imagestrip.js

For example, in old gsap versions you wrote something like this:

TweenMax.to(element,1,{...})

But now it has to be:

gsap.to(element,{
	duration:1,
	...
})

So you only need to change that :)
PS: I attached the new js file where I changed it in some places so now it works, but you still need to replace it on other places.
 

imagestrip.js 15.91 kB · 0 downloads

so so thankyou sir, thankyou somuch for helping me 🤎

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