import { gsap } from 'gsap'; import { ScrollTrigger } from 'gsap/ScrollTrigger'; import { flipEffectGsap } from '$utils/flipEffectGsap'; import { globalInit } from '$utils/global'; import { pinCards } from '$utils/pinCards'; import { projectSlider } from '$utils/swiperInit'; import { textReveal } from '$utils/textEffect'; gsap.registerPlugin(ScrollTrigger); const ready = (callback: () => void) => { if (document.readyState !== 'loading') callback(); else document.addEventListener('DOMContentLoaded', callback); }; ready(() => { //-- MATCH MEDIA --// const mm = ScrollTrigger.matchMedia(); const breakPoint = 992; const isDesktop = `(min-width: ${breakPoint}px)`; // const isSmallDesktop = `(min-width: 1439px)`; //const isMobile = `(max-width: ${breakPoint - 1}px)`; globalInit(); mm.add(isDesktop, () => { flipEffectGsap(); pinCards(); textReveal(); }); projectSlider(); console.log('Home page init (。◕‿◕。)'); });