Jump to content
Search Community

gloria-dee

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by gloria-dee

  1. Hi guys, an update problem was encountered in my project. I wrote a simplified version in the codepen. The timeline contains two animations. When the animation plays, the animation update function will be triggered, and the timeline update function will also be triggered . I hope the first animation play triggers the timeline update, the second animation play will not trigger the timeline update. How to prevent the timeline update function when the second animation is playing? Hope for your reply. Many thanks.
  2. Hi guys, an update timing problem was encountered in my project. I wrote a simplified version in the codepen. As is shown in the codepen, the demand is like this. 1、Every time I click the play button, a corresponding sequence of animations will be played. 2、The animations can be played in a loop. In my real project , the animation which has the same order will be placed into the same childTimeline. The masterTimeline controls all the childTimelines. In the simplified version, we can see that : 1. Box1's animation is order 1. Box2's animation is order 2. Box3's animation is order 3. 2. We hope when the play button is clicked , the animation will be played by order . Like this: order1 → order2 → order3 → order1 → order2 → order3 → order1 → order2 → order3 → ... What confused me most is the following. In the first loop, order1 → order2 → order3, the update time of each order is right. But in the second loop, order1 → order2 → order3,the update time is not expected. When the order1's animation has been played, the order2's onUpdate function will be triggered once. When the order2's animation has been played, the order3's onUpdate function will be triggered once. Why the next order's onUpdate function is triggered? And how to prevent the next order's update function from being triggered after an animation is finished? Hope for your reply. Many thanks.
  3. hi guys, how to play a specific animation in a child timeline ? And how to play a child timeline in the nested timelines? As is shown in the codepen, Box1 and Box2 each have two animations. 1、 The child1_timeline controls the Box1's animations; 2、The child2_timeline controls the Box2's animations; 3、The master_timeline controls the child1_timeline and the child2_timeline; I hope: Case 1、When the "play box1 anim" button is clicked, the Box1's all animations will play. Case 2、When the "play box2 anim" button is clicked, the second animation of Box2's animations will play. Case 3、When the "play all animations" button is clicked, all the animations of Box1 and Box 2 will play. Now case 3 is ok, but case 1 and case2 don't work. In nested timelines, how to play a specific animation in a child timeline? And how to play a child timeline instead of the master timeline? Hope for your help.
×
×
  • Create New...