Jump to content
GreenSock

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

damienmajer

Members
  • Posts

    11
  • Joined

  • Last visited

Posts posted by damienmajer

  1. Hey,

     

    When animating an unknown number of elements like so:

    var timeline = new TimelineMax({repeat:-1}),
    items = document.querySelectorAll('.item'),
    startDuration = 20;
    
    
    for(var i = 0; i < items.length; i++) {
      var myDelay = (i * 0.5);  
      animate(items[i], myDelay);  
    }
    
    
    function animate(item, delay) {
      var a = TweenMax.to(item, startDuration, { rotationZ:'360', ease:Linear.easeNone, repeat:-1 });
      timeline.add(a, delay);
    }
     
    What is the best way to modify the duration/speed of an individual tween?
     
    Thanks
×