Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

Oleh12

Members
  • Posts

    1
  • Joined

  • Last visited

Oleh12's Achievements

  1. What is better to use ScrollTrigger.batch or gsap.utils.toArray...? I mean performance, speed, etc... Here are two examples of code gsap.utils.toArray('.jsc-line').forEach(el => { gsap.from(el, { width: 0, duration: 0.8, scrollTrigger: { trigger: el, start: 'bottom 80%', markers: true } }); }); var elms = '.jsc-line'; gsap.set(elms, {y: 20, opacity: 0}); ScrollTrigger.batch(elms, { toggleActions: "restart none none reverse", onEnter: batch => gsap.to(batch, {ease:"Pover1", duration: 0.3, y: 0, opacity: 1, stagger: 0.3 }) }); Thank you
×