Jump to content
Search Community

nolafs

Business
  • Posts

    22
  • Joined

  • Last visited

Posts posted by nolafs

  1. Thanks for looking into it. I understand but putting this in CodePen will not actually throw the error. Is most likely something else is buggering up the site pin init. Regarding the version, it is very strange, I use npm to load GSAP. The site is generated on netlify and should always load the latest version. I have no idea where that old version is loaded from. I have a look. 

  2. The page contains a small Angular application but Scrolltrigger is not imported into the app. I was wondering about the same. The angular application does not import ScrollTrigger at all. Here is page with pin activated

     

    https://637f4caaccf1f50008f1f54c--determined-keller-77949e.netlify.app/careers/

     

    On the live site, I removed the pin. Overall the performance seems to better without it anyway. The angular application is small block at the bottom for the job listings.

     

    https://www.firesprite.com/careers/

     

    Cheers

    Olaf

     

  3. Hi,

     

    I experience a very strange error. It does not happen every time I do load the page. Sometimes it just recovers or no error at all. I can create the error relative consistently if use history button to go back to page. 

     

    polyfills.js:1 Uncaught TypeError: trigger.revert is not a function
        at _revertAll (ScrollTrigger.js:423:1)
        at _refreshAll (ScrollTrigger.js:468:1)
        at v.invokeTask (polyfills.js:1:7158)
        at M.runTask (polyfills.js:1:2553)
        at m.invokeTask [as invoke] (polyfills.js:1:8209)
        at Z (polyfills.js:1:20772)
        at N (polyfills.js:1:21167)
        at B (polyfills.js:1:21331)
        at _swapPinIn (ScrollTrigger.js:624:1)
        at ScrollTrigger.init (ScrollTrigger.js:1121:1)

     

    Also not consistent, some user experience they cannot actually scroll page. The scroll bar works but page is not actually scrolling.

     

    Any idea why?

  4. Nope, using npm. It is an older project, I am upgrading to webpack 5. I just managed a failed build without the import errors from GSAP. My netlify.toml had and older npm version set in the build.environment. Since I upgraded it to 8.5.0, no GSAP errors but scrollMagic is playing up now. Joy of upgrading old projects. Will remove it anyway in favour for ScrollTrigger.

    • Like 1
  5. As I am using webpack, the modules should be the correct import but it behaves terrible. Is seems it is unable to update when scrolling. It is jumpy and choppy.  The animation is super simple. 

     

    ```

      gsap.utils.toArray(".parallax").forEach(layer => {
       const tl = gsap.timeline({
        scrollTrigger: {
         trigger: layer,
         start: "top top",
         end: "bottom top",
         scrub: true,
         markers: false
        }
       });

       const depth = layer.dataset.depth;
       const movement = -(layer.offsetHeight * depth)
       tl.to($(layer).find('.imageWrapper'), {y: movement, ease: "none"}, 0)
      });

    ```

  6. Yeah, I start turning off some stuff including the smooth scroller. That did improve the animation but it still not 100% smooth and jumpy at times. It seems to perform just a bit better in Safari too. Very frustrating, spend days on my local build to optimise the animation and now the production build just won't work.  

     

    On thing I did notice, when I import

     

    import { ScrollTrigger } from 'gsap/dist/ScrollTrigger';

     

    I get good performance on my development but 

     

     

    import { ScrollTrigger } from 'gsap/ScrollTrigger';

     

    Impossible jumpy and choppy animation but on my Angular webcomponent, complete the other way around. 

     

  7. Hi,

     

    I am having issues with production builds using ScrollTrigger. The animation is smooth as butter under development build but when all minimised it is choppy and unusable. The site uses a couple of angular web-component which compile their own version of ScrollTrigger which seem to work fine. Something seem to go wrong when minifying and combining the page js files.

     

    It beats me why Angular production compile doesn't have the problem. Anything tricks I might missed when setting up my webpack production build?

     

    Cheers

    Olaf   

  8. Hi Jack,

     

    Actually that line of code is causing the error. My guess is that Angular Universal cannot render it as it has DOM. So anything that might tries to select an element will through an error. Just speculating,  the only solution is to check if the platform is browser and only init the plugin if this is true.

     

  9. Hi guys,

     

    I am trying use the draggable plugin in one of my components in angular. All is working fine but the universal server build doesn't like 'registerPlugins'. It all builds fine but server errors with 

     

     Uncaught (in promise): TypeError: Cannot read property 'style' of undefined
    TypeError: Cannot read property 'style' of undefined
     

    Any ideas? 

     

    Cheers

    Olaf

  10. Hi,

     

    I am trying to create a slot machine interface with a continues rotation using the ThrowPropsPlugin. Once I reach the bounds of scroll area, i need to reset list y position to achieve continues rotation. Any idea how I can I make this work with ThrowPropsPlugin?

     

    Any suggestion or help would be greatly appreciated.

     

    o

×
×
  • Create New...