samedi 24 décembre 2016

Use greensock with handlebars

I have a template I made with Handlebars that looks like this:

 <script type="text/x-handlebars-template" id="student-template">
       
          <div class="clearfix">
            
              <div class="col-lg-3 col-md-4 col-xs-6 thumb">
                <img src="" title=" /> 
                </div>
           </div>  
       
    </script>

I would like to use Greensock library to animate the rendering of student images. From my understanding about greensock, My code would like like this:

var timeline = new TimelineLite();
timelime.add(TweenLite.from($currentImage, 1, {y: 100}));
timelime.add(TweenLite.from($nextImage, 1, {y: 100}));
timelime.add(TweenLite.from($nextnextImage, 1, {y: 100}));
.. and so on for all images..

How do I render images based on my template and at the same time loop through all images to animate them?




Aucun commentaire:

Enregistrer un commentaire