백그라운드 영상과 swiper 연계
const video = document.querySelector('.video-background')const swiperText = new Swiper('.swiper', { speed: 1600, loop:true, mousewheel: { }, pagination: { el: '.swiper-pagination', clickable: true }, navigation: { prevEl: '.swiper-button-prev', nextEl: '.swiper-button-next' }})swiperText.on('slideChange', function() { gsap.to(video, 1.6, { currentTime: (video.duration / (this.slides.len..
2024. 7. 9.
horizon parallax, particle
new Swiper(".slider", { //direction:"vertical", speed:2000, mousewheel: { enabled:true, sensitivity:2.4, }, spaceBetween: 18, parallax:true, //freeMode:true}):root{ --transition:1.5s cubic-bezier(0.2, 0.6, 0, 1) ;}.slider {height: 100%;}.slider__layer{position: absolute; /* transition: var(--transition) !important; */ inset:0; background-size: cove..
2024. 7. 6.
swiper bind
document.querySelectorAll(".slider").forEach((n, i) => { window[`slider${i+1}`] = new Swiper(n, { freeMode:true, centeredSlides:true, direction:"vertical", mousewheel:true, slidesPerView:1.75, slidesOffsetBefore: -125, })})bindSwipers(slider1, slider2, slider3, slider4); ..
2024. 7. 6.
gsap+smoothScroll
gsap.registerPlugin(ScrollTrigger, ScrollSmoother);if(ScrollTrigger.isTouch !==1){ ScrollSmoother.create({ wrapper:".wrapper", content:'.content', smooth:1.5, effects:true })}//topgsap.fromTo(".hero-section", { opacity:1}, { opacity: 0, scrollTrigger: { trigger: ".hero-section", start: "center", end: "820", scrub: true }})/..
2024. 7. 6.