Denys1234
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by Denys1234
-
-
On 12/29/2023 at 9:25 PM, GreenSock said:
If it's only on mobile devices, it sounds like maybe it's just the screen resizing when the address bar shows/hides which causes a ScrollTrigger.refresh() by logical necessity. If you want it to skip that, you can just do this:
ScrollTrigger.config({ ignoreMobileResize: true });
If that still doesn't quite work the way you want, you could also try this:
ScrollTrigger.normalizeScroll(true);
Yes, it works)
Thank you so much, you saved me -
When I'm scrolling my animation, one part of it is randomly jumping from one tween to another
I have this issue just in one part of an animation.
Here is my timeline configuration
.timeline({ paused: false, scrollTrigger: { trigger: generationRef.current, //markers: true, scrub: 0.5, start: 'top top', end: () => '+=' + window.innerHeight * animationHeight, pin: true, pinSpacing: false, invalidateOnRefresh: true, refreshPriority: 1, }, })
It's jumping somewhere at this point:
.to( getGsapSelector('GSAP_GENERATION_BAR_ASTRONAUT_FINAL'), { visibility: 'visible', translateX: '-63%', translateY: '-36%', duration: 2.5, scale: 1, opacity: 1, }, `${scroll5}+=2.1`, )
And it happens only on mobile device
I'm completely new to gsap and such animations so I'm just stuck
Tweens are running forward or back randomly
in GSAP
Posted
That is very useful, thanks for your advice!
It really makes things better)