@acanto/core-animations

To automatically bridge gsap to into-viewport events on scroll you can use the animOnScroll helper normally, but importing gsap separately, like so:

Usage no npm install needed!

<script type="module">
  import acantoCoreAnimations from 'https://cdn.skypack.dev/@acanto/core-animations';
</script>

README

Animation

onScroll: Animate on scroll

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
});