Gsap timeline position parameters
Gsap timeline position parameters In the following timeline code: let mytimeline = gsap . timeline () mytimeline . to ( '.box1' ,{ x : 400 , duration : 1 }) . to ( '.box2' ,{ x : 400 , duration : 1 }) . to ( '.box3' ,{ x : 400 , duration : 1 }) normally when animation of box1 completed in 1s then box2 starts and after 1second of box2 animation of box3 starts if the duration of box1 was 5 second then animation of box1 will take 5s to complete and then only animation of box2 starts. For more enhancement the position parameter was introduced Some of the examples of position parameter are: 1. let mytimeline = gsap . timeline () mytimeline . to ( '.box1' ,{ x : 400 , duration : 1 }) . to ( '.box2' ,{ x : 400 , duration : 1 }) . to ( '.box3' ,{ x : 400 , duration : 1 }, 1 ) On that box 3 there is "1" outside the {} which means that start exactly at a time of 1 It do...



Comments
Post a Comment