Jump to content

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


  • Content Count

  • Joined

  • Last visited

Community Reputation

8 Newbie


  • Rank
  1. MSCAU

    Tween Vue array

    Following another post by @OSUblake in these forums using the most basic Vue setup, I can see that an array in Vue can be tweened with GSAP, but it's pretty useless unless the DOM is updated too with Vue. Is something in Greensock preventing my CodePen {{ arr }} from updating during the tween? See also:
  2. How should we phrase this with GSAP v.3? It's not clear from the docs and all forum posts on this predate v.3.
  3. I have not been able to reproduce this in a simple example (or at least my simple example doesn't exhibit the same issue) so I'm just looking for someone who might be familiar with how roundProps works under the hood, or who might know enough about Vue + GSAP to provide a hint. I have a Vue instance which displays a list of user comments. Each comment is defined as a component in Vue. Comments can either be "live" or "pending". As each pending comment is mounted(), I start a countdown, giving the user 60 seconds to edit their comments before the status is changed to "live". I use G
  4. Yes thanks. I find I can run both of these successfully: tl.to(".div1", SPEED, {borderRadius: "+=10%"}); and tl.to(".div1", SPEED, {borderRadius: "+=10% +=10%"});
  5. It appears that a simple borderRadius tween with a relative increment value only affects the Y component of the CSS border-radius property (#1 in CodePen). I can get around it using an absolute value (#2 in the CodePen), but I thought this was odd so should be reported. Thoughts?
  6. Thanks to the above discussion, I now have a countdown clock which doesn't pause when switching to a new tab: https://codepen.io/MSCAU/pen/XyXoba
  7. Aha, the light bulb has gone off! I had no idea tweens are crystallized at the time of instantiation. Thanks for explaining that, @Dipscom. I like @Greensock's suggestion too which led me to the apposite video on https://greensock.com/docs/TweenMax/invalidate and the solution to the problem: https://codepen.io/MSCAU/pen/oPxEwY
  8. Thanks, @Dipscom, that doesn't sound right. The function $('.floater').click(function(e) {...} runs before every animation and already sets the fixed_offset_top value. Having that value change triggered by a window resize event rather than a click doesn't sound likely to make any difference. And as you can see here, it doesn't: Maybe I'm not understanding what you mean by "recreate your timelines".
  9. I have a toolbar which can be either at the top or the bottom of the window (position: fixed). I use tlup and tldown tweens to transition between the two positions. I want this to continue working smoothly when the user resizes the browser (eg. by rotating their mobile device - hence the fixTop and fixBottom callbacks). Despite the fact I'm recalculating the pixel distance between the top and bottom of the screen before each pass (via the fixed_offset_top variable), once the window is rotated, it seems as though my animation is preserving some 'memory' of its previous tween target as it doesn'
  10. Hmm. I think it's because at the time I'm setting up the callback for tl4, tl5 hasn't been declared yet and the tl4 callback expects tl5 as a parameter. I'm happy to take suggestions on how best to structure this!
  11. (I am trying to use two separate timelines for open and close animations. I have two tests set up which have the same error.) I pass references to timelines to my callback functions. When I pass them as timeline instances, the callback function reports that they are undefined. I can work around it by passing the names of the timelines as strings but that is clumsy. What am I missing? You'll need to have the console open to see the errors. They also manifest themselves after a few toggle actions as timelines don't get reset properly.
  12. Ah, OK thanks!
  13. Three years later, wondering whether there's been any progress on this front?
  14. Thanks, this was helpful. I ended up starting my own CodePen question before I found Carl's answer so I'm posting this here in case anyone else needs another reference in future: