README
Animation
: Animate on scroll onScroll
To automatically bridge gsap
to into-viewport events on scroll you can use the animOnScroll
helper normally, but importing gsap separately, like so:
import animOnScroll from "@acanto/frontend/animations/onScroll";
import { gsap } from "gsap";
animOnScroll("custom", element => {
return gsap.from(element, {
rotation: 360,
opacity: 0,
duration: 0.6
});