It is honor to meet you, Jach!!!
Could you tel me how did you fix it??
I have a same problem with my project...
maybe I think ' ScrollTrigger.create({blar~ blar})' is make issue.... (It just my opinion... )
I use gsap v3.3.3 and ScrollTrigger v3.3.3 before the my js code.
I don't have an idea...
// 'use strict';
ScrollTrigger.name = "ScrollTrigger";
gsap.registerPlugin(ScrollTrigger);
/* Main Page Animation */
(function() {
// Top of Main
var section01after = CSSRulePlugin.getRule('.main_section01::after');
var mainLoadTL = gsap.timeline();
var sec01BgFadeoutTL = gsap.timeline();
var sec01BgFadeInTL = gsap.timeline();
mainLoadTL
.from(section01after, {duration: 5, top:'-40px'})
.from('.main_section01 .bottom_bg', {duration: 3, opacity:0, delay:1}, '0')
.addLabel('label1', '.5')
.from('h1 span', {stagger: 0.15, duration: 1, opacity:0, y:10}, 'label1')
.from('h1+.tit_desc', {duration: 1, opacity:0, y:10}, 'label1+=1.3')
.from('h1+.tit_desc .em', {duration: .7, opacity:0, x:5}, 'label1+=2')
.from('h1+.tit_desc .em span > span', {duration: 1.5, opacity:0}, 'label1+=2.5')
;
sec01BgFadeoutTL
.pause()
.to(section01after, {duration: 1, top:'-100px', opacity: 0})
;
sec01BgFadeInTL
.pause()
.to(section01after, {duration: 1, top: 0, opacity: 1})
;
// section01 pin control
ScrollTrigger.create({
markers: true,
trigger: '.main_section01',
pin: true,
// pinSpacing: false,
start: '1 top',
// end:'+=50',
onEnter: () => {
document.querySelector('.main_section01').classList.remove('deactivated');
sec01BgFadeoutTL.restart();
},
onLeaveBack: () => {
document.querySelector('.main_section01').classList.add('deactivated');
// mainLoadTL.restart();
sec01BgFadeInTL.restart();
}
});
})();