stevg Posted July 16, 2021 Share Posted July 16, 2021 I suspect I'm doing something wrong here, but I can't get the random function (as a string) to work in the 'from' part of a fromTo. However the random function for the delay in the 'to' part is working. Specifically I'm trying to animate each SplitText character to start from a random x y. The Random Values section in the docs here seems to suggest I'm doing it correctly? https://greensock.com/docs/v3/GSAP/gsap.fromTo() See the Pen ExmmXzj by ste-vg (@ste-vg) on CodePen Link to comment Share on other sites More sharing options...
GreenSock Posted July 17, 2021 Share Posted July 17, 2021 I'll look into that, @stevg but there's a simple workaround - just use function-based values and the utility function: See the Pen XWRRaGM?editors=0010 by GreenSock (@GreenSock) on CodePen I added rotation: 0.01 to avoid the pixel snapping that some browsers do which makes the motion look a little chunky at the end. Totally unrelated to GSAP - it's just the browser's rendering algorithms at play (thanks, browsers 🙄). 2 Link to comment Share on other sites More sharing options...
GreenSock Posted July 17, 2021 Share Posted July 17, 2021 This should be fixed in the next release which you can preview at https://assets.codepen.io/16327/gsap-latest-beta.min.js 👍 2 Link to comment Share on other sites More sharing options...
stevg Posted July 17, 2021 Author Share Posted July 17, 2021 Awesome, thanks Jack, for the workaround and the tip about rotation! 2 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