Vadym S.
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by Vadym S.
-
-
See the Pen GRPzydj by twtracer (@twtracer) on CodePen
I don't need it to repeat from the beginning.
it has to go from 100px to 200px, then from 200px to 300px, etc
like this: https://share.zight.com/GGuy2RLq
-
Hi, can you please adwise how I can make relative animation so object enlessly moves in specific direction on some step relatively to it current position.
Start: box (x=0 y=0)
iteration 1: 1s animation box (x=100 y=0)
iteration 2: 1s animation box (x=200, y =0)
iteration 3: 1s animation box (x=200, y =0)
and so on and so on..
I don't have end point, I don't have a total time ofr animation, but I know that obkect has to move 100px during 1s.
-
- 1
-
Hi, Is there a way to make snapping not to closest point but to next depending on scroll direction
The code:
$('.image-shrink-animation').each(function(){ let tl = gsap.timeline({ scrollTrigger: { trigger: $(this).find('.pinned-block'), pin: true, start: "top+=300px center", scrub: false, snap: { snapTo: 1/4, duration: {min: 0.01, max: 0.01} }, end: "+=2000", onUpdate: (function(){ let progress = arguments[0].progress, bgimg = $(this).find('.image-background-wrapper'); console.log('///' + progress) if (progress >= .75) { // do smth } else if (progress >= .5) { // do smth } else if (progress >= .25) { // do smth } else { // do smth } }).bind(this) }, }); });
What I want: if progreese 0.02 and direction = 1 - I want to snap to 0.25, not to 0.0
Enless relative animation for the object
in GSAP
Posted
Yes, perfecto. Thank you