Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

Shaun Gorneau last won the day on March 3 2019

Shaun Gorneau had the most liked content!

Shaun Gorneau

Moderators
  • Content Count

    693
  • Joined

  • Last visited

  • Days Won

    21

Shaun Gorneau last won the day on March 3 2019

Shaun Gorneau had the most liked content!

Community Reputation

1,644 Superhero

About Shaun Gorneau

  • Rank
    Advanced Member
  • Birthday May 31

Contact Methods

Profile Information

  • Gender
    Male
  • Location
    Hartford, CT

Recent Profile Visitors

6,158 profile views
  1. I have to admit ... I'm baffled by what you're trying to pull off here that couldn't be done with a single timeline.But to answer this question specifically When you set an absolute position on any tween, you affect that specific tween relative to the entire timeline. Any subsequent tweens are still in their natural order. A simple natural order https://codepen.io/sgorneau/pen/BaNwbvb?editors=0010 Here is one tween with a single position out of order https://codepen.io/sgorneau/pen/yLNzwWe?editors=0010 Here is a tween set relative to the prior tween when the prior tween has a position label used https://codepen.io/sgorneau/pen/jOPGJjP?editors=0010 But if you want to shift all subsequent tweens, I would just use a few different timelines and place those timelines in a single master timeline with 0 positions. https://codepen.io/sgorneau/pen/yLNzrNJ?editors=0010
  2. I've just noticed what you said about assigned dynamic position values ... and that should also work no issue with labels, offsets, and absolute values. Here I have a loop creating the timeline tweens and generating the label value (for the position). https://codepen.io/sgorneau/pen/OJVmwQV?editors=0010
  3. Hi @osmo, There are a few ways we could tackle this. Given your example setup, one thing to do is to use relative position values that set subsequent tweens start positions back to the same time as their "partner" tween. This is easy if you are manually assigning duration values. Have a look here, https://codepen.io/sgorneau/pen/OJVmEeY?editors=0010 Another, and probably better, option is define labels and use those labels for the position parameter for each group (in/out). That way you can feel free to change durations or programmatically assign durations and the groups will have the same starting point. https://codepen.io/sgorneau/pen/xxGdJKP?editors=0010 Also a quick note, you are calling in GSAP 3 (which is perfect), but using GSAP 2 syntax .. small change from var tl = new TimelineMax( { repeat:'-1' } ); to var tl = gsap.timeline({repeat:'-1'}); Happy tweening!
  4. Hi @noclip27, You'll want to use repeat with a value of "-1", which means repeat infinitely. I've also switched the code to GSAP 3 (with explanations in the comments) to show you how that would be done. https://codepen.io/sgorneau/pen/jOPmmLg?editors=0010 Also ... check out how using 'defaults' can make this even simpler! (best to view these pens at their links so the JS doesn't wrap) https://codepen.io/sgorneau/pen/ExjmmLW?editors=0010 Happy tweening!
  5. Ah, sorry @ZachSaucier! I had just started to reply when I got pulled away from my desk. I should know to back out fully when that happens! 🤦‍♂️
  6. I'm not on a retina display ... an older 2015 iMac
  7. A few notes on GSAP 3 syntax. Duration is now a property within the vars object ... and a timeline can have default property values! Because all of your tweens have a 1 second duration set, rather than set them on each tween, you can set them in the defaults. The same is true for rotation and ease! Of course, where ever you would like some other value, you would just include those on the tween. Have a look here, https://codepen.io/sgorneau/pen/OJPrjVg?editors=1010
  8. Looking at this in Firefox 72.0.1, I really don't see any remarkable glitch or jank (that I don't also see in Safari or Chrome, that is). Although, using string percentage values for the x/y properties could be contributing to that. Try using xPercent and yPercent as they take numeric values. https://codepen.io/sgorneau/pen/KKwbqOR
  9. @Richdigdesign I'm not even sure you need split text for this. To me it just looks like a series of animated lines, each with a "home" position and (eventually) highlighted text. Something like this, https://codepen.io/sgorneau/pen/oNgQmGd Of course you'll want to adjust your final "landing" spot for each segment. And you'll want to look at how these lines of text are created from a semantic and accessibility standpoint. Hope this helps! Shaun
  10. As a start, seeing your site on mobile could reveal some big/obvious issues ... so certainly post the URL
  11. If I understand correctly, you'd like to tween "visibility". But, visibility isn't a tweenable property because either it is (visible) or it isn't (hidden), there are no states in between. Taking a step back, what is it you're trying to achieve that leads you to believe visibility: hidden; is the answer?
  12. Hi @Gilbert, For a dynamic value you’ll want to do something like
  13. Hi @Zahir Rafiq The problem is in each of your click events, you're only accounting for one other color's timeline to have been played when either of the two other colors' timeline could have a progress greater than 0. For example, your green click event only looks to see if the red timeline has a progress value ... it doesn't check if blue does. Have a look at this codepen to see how I've addressed that. Now ... this works well for a few colors. If we were allowing for this on something like 10 colors ... of course this way would quickly get out of control and we would want to abstract that away somehow. https://codepen.io/sgorneau/pen/MWYGXaq?editors=0010 Happy tweening! Shaun
×