File: D:/HostingSpaces/SBogers10/komma.pro/resources/assets/js/site/viewport/viewportAnimations.js
/* ==========================================================================
Contains all viewport animations
========================================================================== */
var ViewportAnimations = {
/* Team members on about page
========================================================================== */
Team : {
delay : 0,
/**
* Fade in members from the bottom
*
* @param $el
*/
show : function($el)
{
// Animate translateY to 0 with some delay
TweenLite.to($el.children('.portrait').children('img'), 2,{
y : 0,
ease: Power2.easeOut,
opacity: 1 }
).delay(this.delay);
// Add some delay
this.delay += .2;
// Add a show class so data-in-viewport will ignore this once visible
$el.addClass('show');
}
},
Process : {
/**
* Animate text
*/
show : function($el)
{
if( ! $el.hasClass('shown'))
{
$el.addClass('shown');
var delay = .5;
$el.children().each(function(){
// Animate translateY to 0 with some delay
TweenLite.to($(this), .8,{
y : 0,
ease: Power4.easeOut,
opacity: 1 }
).delay(delay);
// Add some delay
delay += .2
});
}
}
}
};