chrisgannon Posted July 6, 2020 Share Posted July 6, 2020 It seems there's typo in the docs - it should be tween.pause(0.25); - this generates the correct logged values. See the Pen 2a7355eef9eb5df6fc270f80e3da5a73 by chrisgannon (@chrisgannon) on CodePen 1 Link to comment Share on other sites More sharing options...
OSUblake Posted July 6, 2020 Share Posted July 6, 2020 Or maybe it would be clearer if the duration was 1. const easeFunc = gsap.parseEase("power2.out"); const tween = gsap.to({foo: 0}, {foo: 10, ease: "power2.out", duration: 1 }); tween.pause(0.5); console.log(tween.progress()); // 0.5 console.log(tween.ratio); // 0.875 console.log(easeFunc(tween.progress())); // 0.875 1 Link to comment Share on other sites More sharing options...
chrisgannon Posted July 6, 2020 Author Share Posted July 6, 2020 This smells like someone forgot the new default duration in GSAP 3.x is 0.5 and not 1! 1 Link to comment Share on other sites More sharing options...
GreenSock Posted July 6, 2020 Share Posted July 6, 2020 3 hours ago, chrisgannon said: This smells like someone forgot the new default duration in GSAP 3.x is 0.5 and not 1! Busted! Good catch. Fixed. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now