Jump to content
Search Community

ScrollTrigger

Vitaliy3301 test
Moderator Tag

Recommended Posts

Hi @Vitaliy3301,

 

You just need to counter rotate the text icons:

 

const rotate = gsap.timeline({
  scrollTrigger:{
    trigger: ".container",
    pin: true,
    scrub:0.2,
    start: 'top top',
    end:'+=10000',
  }
})
  .add('sync')
  .to('.circle', {
    rotation:360,
    duration:1,
    ease:'none',
  }, 'sync')
  .to('.circle__icon', {
    rotation: -360,
    duration:1,
    ease:'none',
  }, 'sync')

 

  • Like 3
Link to comment
Share on other sites

Since each of your .circle_icon divs are children of the parent circle they will rotate along with the parent. By using a tween targeting only the icon rotation in the opposite direction, you give the appearance of the icons/text remaining upright. It just needs to be the opposite of the parent. If the parent circle is rotating 720 then you'd need to rotate the icons -720 over the same duration.

 

Make sense?

:)

 

  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...