kf420 Posted March 25, 2021 Share Posted March 25, 2021 I have an SVG timeline of sorts consisting of polyline and polygons indicating dates, and would like to animate each polygon into view as it enters the screen. Seems like a no-brainer with scrollTrigger, however it appears that start and end positions for each polygon are calculated incorrectly (as indicated by misaligned markers in CodePen), I'm assuming because the group containing polygons is already being animated in a separate tween with "scrub" setting set to true. Is there any way to get an accurate position of each polygon in this scenario, or do I need to set it up differently? See the Pen 834d4f7c23ed11e273be33bcf31c6556 by kf420 (@kf420) on CodePen Link to comment Share on other sites More sharing options...
mikel Posted March 25, 2021 Share Posted March 25, 2021 Hey @kf420, You could use the scrub progress to position the appropriate tweens. See the Pen qBqEeMj by mikeK (@mikeK) on CodePen Or a stagger function like here See the Pen ab8b14b2007dbdd1bfa1effc7711ff20?editors=0010 by mikeK (@mikeK) on CodePen Happy tweening ... Mikel 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