Jump to content
Search Community

teste_brazil_1998

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by teste_brazil_1998

  1. 1 hour ago, elegantseagulls said:

    @chrisgannon has a lot of complexities going on in his button. I'd recommend starting simple with your own design and working up from there than just trying to pull a larger complex animation into your site all at once.

    How would this one look?

     

    tl.staggerFromTo(allClouds, 0.6, {
     cycle:{
      y:[120, 160],
      x:[0]
     }
    },
    { cycle:{
      y:[0],
     x:[0]
     },
     alpha:1,
     immediateRender:false
    },0.06,'-=1')

  2. 5 minutes ago, elegantseagulls said:
    const tl = gsap.timeline()
    
    tl.to(['.sun', '.moonMask', '.moon'], {
      attr: gsap.utils.wrap([{cx:'-=140', cy:'-=20'}, {cx:'-=140', cy:'-=20'}, {cx:'-=90',  cy:'-=0'}]),
      duration: 1, 
      stagger: yourStaggerAmount // yours is currently none, so you could remove this line
    }

    Check out GSAP's wrap utility to compare to the old cycle: https://greensock.com/docs/v3/GSAP/UtilityMethods/wrap()


    I haven't had my coffee yet, so let me know if this has issues

     

    Typescript show this error 

     

    Type '(index: number) => { cx: string; cy: string; }' is not assignable to type 'AttrVars'.
      Index signature for type 'string' is missing in type '(index: number) => { cx: string; cy: string; }'.

×
×
  • Create New...