Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

926 profile views

deejbee's Achievements



  1. Hijacking this a bit but what happens if I have a situation where I'm using the addClass/removeClass and a timeline. I'm not sure if this is the right approach or not as the class could be applied and removed to an element quite rapidly, before the previous animation has completed potentially. I'm seeing growing memory usage which I think it might be doing this wrong as I have the timeline variable outside the addClass/removeClass, which feels a bit wrong. I have a feeling that timelines are getting orphaned but still running their animation loops. .animation('.sample', ['$animate', function ($animate) { var tl; return { addClass: function (element, className, doneFn) { var images = element[0].getElementsByTagName('img'); tl = new TimelineMax({ repeat: -1 }); tl.staggerTo(images, 0.2, { y: -40 }, 0.2); doneFn(); }, removeClass: function (element, className, doneFn) { if (tl) tl.clear(); doneFn(); } } }])
  2. Ah totalTime was the key! Thanks so much - I've been tearing my hair out with this problem.
  3. Thanks, I forked again and added the repeat but the arrow is accelerating now for some reason. I guess something needs resetting somewhere? http://codepen.io/anon/pen/Zbgvvm
  4. Hi all, I'm trying to make an object move around a track using the svg path. It works nicely until it gets to the end of the first lap (which is an oval). I have to use the progress parameter which is updated every second from elsewhere. I can't see a way to move from the first lap to the next because once progress is >= 1 then the object stops at the end of the first lap. What I have so far is producing inconsistent results when it transitions from the end of the first lap to the start of the second. Is there a recommended way to get a smooth animation as the progress continues beyond the first lap? Any help much appreciated. Codepen attached. Thx.
  5. oh man, I think you just saved my life!
  6. I have read the docs for autoRotate, but it doesn't seem to make a difference. The angle of rotation seems to be right (using the tangent to the curve), its just the positioning offset that looks wrong as it moves along the path, until it reaches the first straight but then drifts again after that section.
  7. Hi, I'm trying to get an object to follow a given path and autoRotate but it doesn't seem to quite work. It works ok when autoRotate is false, in that the top left corner of the blue box follows the path exactly, but when I enable autoRotate it drifts. Could it be something to do tithe the transformOrigin? I tried adding transformOrigin: 50% 50% to the tween but it had no effect. Anyone have any ideas what's wrong? Many thanks
  8. I have an existing timeline running that I no longer have the JS reference to the timeline for. I want to completely stop the timeline animation so I can add a new timeline to the same set of html elements. TweenMax.killTweensOf(objects) does nothing. How is this done? thx.