shalanah Posted January 13, 2020 Share Posted January 13, 2020 Hi! I was wondering why when using a custom array of values why `ease: "none"` or `ease: "linear"` do not seem to apply. Looks like gsap uses some other type of easing along a path points. You can tell in the Codepen because of the noticeable "stops" and not simply a change in speed. See the Pen WNbyQpW by shalanah (@shalanah) on CodePen 1 Link to comment Share on other sites More sharing options...
mikel Posted January 13, 2020 Share Posted January 13, 2020 Hey @shalanah, Welcome to the GreenSock Forum. Apparently both coordinates - x and y - have to be listed. Why? @GreenSock could answer that. See the Pen eYmKBXw by mikeK (@mikeK) on CodePen Happy tweening ... Mikel Link to comment Share on other sites More sharing options...
shalanah Posted January 13, 2020 Author Share Posted January 13, 2020 @mikel awesome thanks! Link to comment Share on other sites More sharing options...
GreenSock Posted January 14, 2020 Share Posted January 14, 2020 Yes, that's actually by design and it's easy to "fix". Just set curviness: 0. That's it. The reason it behaves that way (easing in and out of each position) is because that's typically the desired behavior when things are traveling through points. Imagine animating the scale of something through various values - it's a really nice effect to have it kinda ease in and out of each position, but that's DIFFERENT than the easing of the playhead across the overall tween. Anyway, the default curviness is 1, and when you're dealing with a 1-dimensional animation like this (only the "x" property), that affects the easing in/out of each value along the way. Setting curviness to 0 basically forces it to be completely linear. Does that clear things up? See the Pen 0a8b82bf4a01c9d696398d13b49f1f0b?editors=0010 by GreenSock (@GreenSock) on CodePen 3 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