(function ($, root, undefined) { $(function () { 'use strict'; // DOM ready, take it away const startAnimation = gsap.timeline(); let startAnimationItems = $('#figures img'); let startAnimationLength = startAnimationItems.length; console.log(startAnimationLength); startAnimation.set(('#greeting span'), { y: '100%', rotationY: -40, }); startAnimation.set(('#greeting span'), { opacity:0, }); startAnimation.from((startAnimationItems), { delay:.3, opacity:0, y: '100%', ease: Power4.easeOutIn, duration: .4, stagger: .1, }); startAnimation.to(('#greeting span'), { delay: -1, opacity:1, y: '0%', rotationY: 0, ease: Power4.easeOutIn, duration: .6, stagger: .8, }); startAnimation.to($('#figures'), { delay: -2, x: "-100%", ease: Linear.easeNone, repeat: -1, duration: 50 }); // start animations let onceIn = $('.once-in'); gsap.set((onceIn), { y: "25vh", opacity:0, }); gsap.to((onceIn), { duration: 1, y: "0vh", stagger: .05, ease: "Expo.easeOut", delay: .2, opacity:1, clearProps: "true" }); // scrub reveal gsap.utils.toArray(".scrub").forEach(scrub => { gsap.from(scrub,{ opacity:1, y:"+=96", scrollTrigger:{ trigger:scrub, start:"top bottom", end: '+=20%', scrub:2, } }) }); // programma gsap.from('#programme .time-slot',{ opacity:1, y:"+=96", stagger: 0.15, scrollTrigger:{ trigger: $('#programme'), start:"100px bottom", } }); // artikelen gsap.from('#artikelen-section .card',{ opacity:1, y:"+=96", stagger: 0.15, scrollTrigger:{ trigger: $('#artikelen-section'), start:"100px bottom", } }); ScrollTrigger.create({ trigger: $('#deelnemers-section'), start:"100px bottom", onEnter: goToSlide, }); function goToSlide(){ $('#deelnemer-carousel').flickity( 'select', 4); } }); })(jQuery, this); /*******************************************************************/ /* ftrtch dino */ /* [type: JS] [file:animations] [19.158] DESIGN*/ /*******************************************************************/ /* 0.3 D>D */ /* db 162 */