Vitaliy3301 Posted September 22, 2021 Share Posted September 22, 2021 hello, friends. Faced with the problem, I have the animation of the circle , I need the circles to rotate around the main circle and the text inside (in my case the picture in the real project) to stay straight and not animate stood exactly , ask for your help ) See the Pen QWgBKmG by foka6996 (@foka6996) on CodePen Link to comment Share on other sites More sharing options...
elegantseagulls Posted September 22, 2021 Share Posted September 22, 2021 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') 3 Link to comment Share on other sites More sharing options...
Vitaliy3301 Posted September 22, 2021 Author Share Posted September 22, 2021 Can I get more details? Link to comment Share on other sites More sharing options...
PointC Posted September 22, 2021 Share Posted September 22, 2021 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? 4 Link to comment Share on other sites More sharing options...
Vitaliy3301 Posted September 23, 2021 Author Share Posted September 23, 2021 @elegantseagulls thank you Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now