Hi, I have problem with split text sometimes it's breaking like this
Sometime like this (this is what I want all the time) :
Here is code I use:
const section_1_heading = new SplitText('.section-1 .heading');
const section_1_desc = new SplitText('.section-1 .desc');
gsap.from(section_1_heading.lines, 1.2, {
opacity: 0,
x: -120,
delay: 0.6,
ease: 'power3.out',
stagger: { amount: 0.2 },
scrollTrigger: {
trigger: `.section-1 .container`,
start: 'top 400',
},
});
gsap.from(section_1_desc.lines, 1.2, {
opacity: 0,
x: -120,
delay: 0.6,
ease: 'power3.out',
stagger: { amount: 0.2 },
scrollTrigger: {
trigger: `.section-1 .container`,
start: 'top 400',
},
});