Jump to content
Search Community

StormCode

Members
  • Posts

    9
  • Joined

  • Last visited

Posts posted by StormCode

  1. Hi There, I'm wondering if it is possible to get the following to work with Typescript/Angular:

     

      animateIn(ani) {
        // only do stuff if requested animation is different than active slide
        if (ani !== this.currentAnimation) {
          this.currentAnimation.reverse().timeScale(5); // faster speed
          // this.currentAnimation.vars.callbackScope = this;
          this.currentAnimation.eventCallback('onReverseComplete', this.playNext);

          this.nextAnimation = ani;
        }
      }


      playNext() {
        this.nextAnimation.play().timeScale(1);
        this.currentAnimation = this.nextAnimation;
      }

     

    It seems  playNext() doesn't fire after "onReverseComplete"

     

    I have a simple StackBlitz  https://stackblitz.com/edit/angular-csxrtd

     

    Thanks a lot for any help.

     

    See the Pen by edit (@edit) on CodePen

  2. I was just wondering if anyone has successfully got ScrollToPlugin (v3.0.5) to work with Angular 8. I have it working to a certain degree but it does not respect the vars in the tween.

          gasp.to(window,
            {
              delay: 0,
              duration: 10,
              ease: 'back',
              scrollTo: 978
            }

    All that happens is a smoothScroll to 978. The 'ease' is ignored and strangely  the 'delay' is 10secs which is what the duration is set to!

     

    My component contains:-

     

    import { gsap } from 'gsap/all';

    import ScrollToPlugin from 'gsap/ScrollToPlugin';

     

      constructor() {

        gsap.registerPlugin(ScrollToPlugin);
      }

      ngOnInit() {
        const plugins = [ScrollToPlugin];

    }

     

    Thanks a lot if anyone can help!!

     

     

     

×
×
  • Create New...