import { gsap } from 'gsap'; import { ScrollTrigger } from 'gsap/ScrollTrigger'; import { initCarouselGsap } from '$utils/carouselGsap'; import { flipEffectGsap } from '$utils/flipEffectGsap'; import { initGlobal } from '$utils/global'; import { initRealisationsGridResize } from '$utils/realisationsGridResize'; gsap.registerPlugin(ScrollTrigger); const ready = (callback: () => void) => { if (document.readyState !== 'loading') callback(); else document.addEventListener('DOMContentLoaded', callback); }; ready(() => { //-- MATCH MEDIA --// const mm = gsap.matchMedia(); const breakPoint = 992; const isDesktop = `(min-width: ${breakPoint}px)`; // const isSmallDesktop = `(min-width: 1439px)`; // const isMobile = `(max-width: ${breakPoint - 1}px)`; initGlobal(); initCarouselGsap(); initRealisationsGridResize(); mm.add(isDesktop, () => { flipEffectGsap(); // initHomeRealList(); }); });