Jump to content
Search Community

eduardfossas

Members
  • Posts

    12
  • Joined

  • Last visited

Posts posted by eduardfossas

  1. Hello, I have two versions, one that we can call a prototype and the other one we could call it a production version.

     

    The prototype looks like:

    SPINNER_TIMELINE.to(..., {...})
    
    function animateHero() {
    	INTRO_TIMELINE.to(..., {...})
    }
    
    SPINNER_TIMELINE.call(() => animateHero())

    And then the production version looks like this:

     

    SPINNER_TIMELINE.to(..., {...})
    INTRO_TIMELINE.to(..., {...})
    
    MASTER_TIMELINE.to(SPINNER_TIMELINE, {}).to(HERO_TIMELINE, {}).play()

    Funnily enough, the second version, which for me has more sense, it makes animations look with a low frame rate.

     

    Do you know the reason why?

  2. Hello, sorry if I am bothering too much this forum but I am eager to learn.

     

    I have the following code:

     

    import { gsap } from 'gsap'
    
    export const SPINNER_TIMELINE = gsap.timeline({ paused: true })
    export const LOADER_TIMELINE = gsap.timeline({ paused: true })
    export const HERO_TIMELINE = gsap.timeline({ paused: true })
    export const HEADER_TIMELINE = gsap.timeline({ paused: true })
    export const MASTER_TIMELINE = gsap.timeline({ paused: true })

     

    then I am doing this in a Spinner class:

     

    import { SPINNER_TIMELINE } from '@options/timelines'
    
    class Spinner {
      constructor(element) {
        this.setLoader()
      }
      
      setLoader(spinner, spinnerBot) {
      	SPINNER_TIMELINE.to(
          spinner.left.start,
          {
            x: 10
            duration: '1',
            ease: 'none',
          },
        )
      }
    }

    and then I am having another class that creates and instance of this spinner class

    import {
      SPINNER_TIMELINE,
      MASTER_TIMELINE,
    } from '@options/timelines'
    
    class Intro {
      constructor() {
        new Spinner()
        this.animateMasterTimeline()
      }
      
      animateMasterTimeline() {
        MASTER_TIMELINE.add(SPINNER_TIMELINE, {
          time: SPINNER_TIMELINE.duration(),
          duration: SPINNER_TIMELINE.duration(),
          ease: 'power3.inOut',
        })
      }
    }

    Spinner and Intro class are starting properly but the animation it's not.

    What I am doing wrong?

     

    Warm regards and thanks in advance

  3. Hello, it is just a wondering question that always comes to my mind using Greensock.

     

    Is there any maximum number of timelines that you can have? Does it impacts performance or it is a way of organizing code? It is good, bad or better to have a single timeline.

     

    Thank you in advance and warm regards.

  4. Hello @mikel

     

    Thank you very much, this is exactly what I was looking for.

    I want to thank you all your patience, knowledge and help that you offer in this forum to the whole community.

     

    And thanks for shouting out that I am still using 2 syntax, I will refractor asap, it is much cleaner.

     

    Warm regards.

    • Like 2
  5. Hello animators! Hope you are having a nice day.

     

    I have a problem animating paths and the middle step, it takes too long, so I want it to be more fluid between start and finish, so when the paths meet in the centre does not take that long. I want to use easings so I cannot use Linear.None.

     

    Can you help me out? Thanks and warm regards to the community.

    See the Pen abpEXNZ by eduardfossas (@eduardfossas) on CodePen

×
×
  • Create New...