Jump to content
Search Community

fiatuno

Members
  • Posts

    6
  • Joined

  • Last visited

fiatuno's Achievements

2

Reputation

  1. Thanks I have worked it out by creating two separate timelines repeating and non repeating all good.
  2. I just found an interesting behavior as per the above code if I set repeat to the mainTimeline then it will repeat. But if the main timeline is not repeating and if add another timeline (with repeat:99) to the mainTimeline then this second timeline will not repeat.
  3. Hi Wishing you all a Happy 2019. I have an animation requirement where I have a TimelineMax instance and number of TweenMax instances added to it and some of these TweenMax instances (not all) need to be repeated for number of times. So my question is can I create TimelineMax instances and add repeating instances to it and add these repeating TimelineMax instances to the main TimelineMax instance will it work. Example: // somewhere globally create main var mainTimeline = new TimelineMax({repeat: false, paused: false}); //later on we loop through an array of objects If (obj.repeat){ var tlr = new TimelineMax({repat:99, yoyo:true, paused: false}); tlr.add(TweenMax.to(obj, duration, { x:x, y:y, ease:Quint.easeOut, onUpdate:updateDraw, overwrite: "none" })); }else{ //add TweenMax instances to mainTimeline mainTimeline.add(TweenMax.to(obj, duration, { x:x, y:y, ease:Quint.easeOut, onUpdate:updateDraw, overwrite: "none" })); } mainTimeline.add(tlr, self.getDelay(); //end code Thanks in advance
  4. I have fixed the pen. Now it does what it suppose to do issue was in timing. Updated the code pen.
  5. Hi I have simple code as below adding TweenMax obects to the TimelineMax timeline = new TimelineMax({repeat: false, paused: true, onComplete: cleanTweens, onReverseComplete: reverseComplete}); //note arr is an array of objects and duration, delay and xand y varies sets based on function calls has been omitted for brevity for(var i = 0; i < arr.length; i++){ timeline.add(TweenMax.to(arr[i], someDuration, { x:someX, y:someY, rotate:(x * Math.PI)/180, // handled in updateDraw ease:Quint.easeOut, onUpdate:updateDraw }), someDelay) } then timeline.restart(); and later on based on request will replay like below timeline.reverse(0, false); Issue this vill replay tweens of only last ojects or it appears to play only last tweens. any help appreciated Thanks
×
×
  • Create New...