Jump to content
Search Community

SarunasDaunoras

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by SarunasDaunoras

  1. It almost works with the scrollTrigger.refresh there is still an occasional flicker. I'm kinda new to svelte and all the js stuff still. What would be the best place to make a demo that would work with sveltekit?
  2. Found the solution. Just in case anyone else has the same problem, here is the code: import { browser } from '$app/env'; import { onMount } from "svelte"; onMount(async () => { if (!browser) { return; } const { gsap } = await import('gsap'); const { ScrollTrigger } = await import('gsap/ScrollTrigger'); gsap.registerPlugin(ScrollTrigger); P.S. Not sure if I should create another post or not, so I'll just ask here. ScrollTrigger gets messed up when navigating the page. It seems that maybe it continues to run? If I refresh the page it goes back to working as it should. EDIT: is using refresh() in the end the correct thing to do? ScrollTrigger.refresh();
  3. Hi Everyone, hope someone can help me out. I have been struggling with this for a while. I can't seem to deploy gsap with an npm install. I tried adding the .js like mentioned in the previous posts, but as soon as I do that, I get errors on ScrollTrigger.create ? if I don't use the js, I get the error during build process. Any suggestions?
×
×
  • Create New...