Jump to content
Search Community

Lucky Fox Design

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by Lucky Fox Design

  1. Quote

    sounds like you've got an overwriting problem

     

    It really was a problem with overwriting between tweens.
    I resolved this problem with delay parameter and timings for a timeline and for a tween and with deleted overlap position parameter. Next time I'll think before using this parameter. Thanks a lot for your help.

    • Like 1
  2. I have a single load for all animations where i assign this animations to the variable.
     

    var animations = {
      all: [{ anim: returnADAnimation() }, { anim: returnCLAnimation() }]
    }


    All svg files for different animations hosted in one page, but i see only one svg file with his animation. All others located outside window viewport.
    To see other animations and its svg i have created a carousel.

    • When i switch to next svg, i pause the current animation for current svg and play next animation.
    • When i return to the previous, i pause current animation and restart previous. So in this step i have a big problem.

     

    First animation play:

    436621152_Apr-24-20192-56-14AM.gif.dc1dd14f4f59dc134853b69c04d54ef8.gif

     

    When i restart it i have different play behavior, (all the wheels jumps at the wrong time, and jumps more sharper than in the first play):

    1625159349_Apr-24-20192-56-30AM.gif.39cc1796a5d1e557503cf985061d09d6.gif

     

    ----------------------------------------------------

     

    Pause and restart:

     

          animations.all.map(el => {
            if (el.anim.animationId === menuItemId) {
              let anim = el.anim.animationTl
              anim.pause(0)
            }
          })
          animations.all.map(el => {
            if (el.anim.animationId === id) el.anim.animationTl.restart()
          })



    I have a different timelines for all wheels and one main timeline for all of them.
    Second wheel
     

      let wheel2Tl = new TimelineMax()
        .set('#wheel2', { y: 0 }, 0)
        .to('#wheel2', 0.4, { y: -6 }, 0.5)
        .to('#wheel2', 0.1, { y: 0 }, 0.7)
        .to('#wheel2', 0.4, { y: -6 }, 1.4)
        .to('#wheel2', 0.1, { y: 0 }, 1.6)


    Main timeline:

     

      let mainDroidTl = new TimelineMax()
      	...
        .add(wheel3Tl, 0)
        .add(wheel2Tl, 0)
        .add(wheel1Tl, 0)
        .add(wheelsTl, 0)
    	...

     

    And i return in function this main timeline.

     

    ----------------------------------------------------

    I don't know how to fix wheels timeline problem. I tried everything and I don't know what else I can do.

×
×
  • Create New...