👊TwoWay Vs OneWay

Two methods that are shared by all third-party libraries, including brew’s own Animation.

AnimateOneWay:

AnimateOneWay is a simpler method that only animates a section one way. It runs the animation on a section only the first time the section comes into view, regardless of the scroll direction. The animation for the section will not be triggered again after the particular section's animation gets triggered.

 animate.animateOneWay(section, sections, animationOptions);

AnimateTwoWay:

On the other hand, AnimateTwoWay works very differently. It runs the animation on a section every time the section comes into view, regardless of the scroll direction. Every time the section is visible(inside view), AnimateTwoWay will trigger the animation.

 animate.animateTwoWay(section, sections, animationOptions);

Last updated