Jump to content
Search Community

sho

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by sho

  1. Perfect, thankyou for the super-quick turnaround! On a related note - is the approach I'm taking the most efficient one for the use case? It obviously works but I'm not clear on if there's a better way.
  2. Not particularly, I'm fairly pragmatic about these things but when it's a significant number I do get a little concerned at the possibility of losing an hour trying to debug a really weird error caused by an accidental name collision. For example I actually already had something called RoughEase inside one scope.
  3. There's a few differences in approach, I'm probably doing something the wrong way but here's a test case: http://cdpn.io/JKFBA As you can see x2 ends up set to undefined on the second line. Change the delay on l4 to 0 and all will be well again. What I'm trying to achieve is I want to switch between the two timelines from wherever the animation currently is when some user interaction happens and that may happen repeatedly very quickly. If there is a cleaner/neater way of doing that than recreating the timelines each time then please tell me how.
  4. On a related note - is there a guide somewhere on using GSAP with Require or other module loaders? I could only find a few random forum posts but given the number of globals it creates I'm keen to get it properly shimmed/set up.
  5. I've got two timelines, one to display a set of elements, one to hide them again (different orders/durations/eases etc), most of the elements are SVG. When using the AttrPlugin I'm running into an issue I'm not sure how to resolve: If one timeline overrides the other, properties that are contained in tweens that haven't yet started (ie their delay is greater than the current playhead position) get set to undefined by the second timeline, rather than starting at their current value. Concrete example Timeline 1 will tween x2 on elementA from 0 to 400 between 2s and 4s. Timeline 2 will tween x2 on elementA from 400 to 0 between 0s and 1s. If Timeline 2 is triggered before Timeline1 his 2s, Timeline2 will set x2 to undefined, after which neither timeline will set it again. If Timeline2 is triggered after the 2s, everything is fine. Trawling through stacktraces it seems that this._firstPT is set to null for the properties that cause the error. It may be related to the fact I'm creating each timeline from scratch each time they're triggered but I'm not sure how else to do it - I can't just reverse, they're quite different transitions and if I try and reuse I can't work how to properly reset the position of the 'in' transition when the 'out' is triggered - both can repeatedly partially overlap each other.
×
×
  • Create New...