$(function () { var queryString = location.search let params = new URLSearchParams(queryString) if (!params.get("guid")) { showWelcomeAnimation(); } else { showGridAnimation(); } gsap.registerPlugin('scrollTrigger'); function showWelcomeAnimation() { $('.welcome-anim').show(); $('.blur').show(); var welcometl = gsap.timeline({ "paused": true }); let paths = gsap.utils.toArray('.welcome-anim svg path'); paths.forEach((item, i) => { welcometl.to(item, { y: "-1500px", opacity: 0.6, delay: 0.2, onComplete: function () { console.log('anim done', item); $(item).addClass('hoverscale'); } }, 0.2 * i); }); gsap.to('.blur', { opacity: 0, autoAlpha: false, delay:2, duration: 2 }); gsap.to('.welcome-anim', { opacity: 0, autoAlpha: false, delay:2, duration: 2 }); welcometl.play(); }; function showGridAnimation() { $('.welcome-anim').hide(); $('.blur').hide(); var tl = gsap.timeline(); let items = gsap.utils.toArray('.box'); items.forEach((item, i) => { tl.from(item, { y: "500px", delay: 0.075, onComplete: function () { console.log('anim done', item); $(item).addClass('hoverscale'); } }, 0.075 * i); }); } }); /*******************************************************************/ /* ftrtch dino */ /* [type: JS] [file:template-container] [97.1893] DESIGN*/ /*******************************************************************/ /* 0.3 D>D */ /* db 157 */