Jump to content
Search Community

shoey

Members
  • Posts

    7
  • Joined

  • Last visited

shoey's Achievements

1

Reputation

  1. Hi sorry if this has been asked already it's kind of a hard question to search for. I plan to have a pixi js scene of images for my website background where I'm often tweening images in and out of the scene, but in some scenarios tweening already offscreen images offscreen again so those tweens don't change any values. Do these unnecessary tweens affect performance? Is it better for performance to have conditional checks instead of 'no change in value' tweens? I don't think I will have performance issues either way but I wonder if gsap already has something built-in that automatically optimizes 'no change tweens' so that they don't have any affect on performance even if there are a large amount of them triggered all at the same time. Thanks.
  2. I watched the video from link, and I quite enjoyed the comment towards the end of the video regarding the impossibility of animating with the need to rely on one tween triggering the next tween as that was exactly what I thought I had to do and was struggling with. Using absolute values for position paramaters made my life much easier. Thank you.
  3. Oops, I didn't notice my first example had that conflict. The animations in step 2 were not important, only the timing on when step 2 begins was the point of that example. I'll look into the link you sent me as well as give the nested timeline approach a try. Thank you so much, Matt
  4. Related to my first question (and possibly the same solution?), I'm also wondering if it's possible to ignore a step in the timeline, so the timeline can continue without waiting for a specific step or tween to complete, and again without the use of so many offset parameters. In the following example, I want mc1 & mc2 to start a position tween at the same time and end at different times. So when mc1=100, I want an alpha tween to begin immediately, and likewise when mc2=100. To make this happen, I added an offset parameter to step 2, however this will affect when step 3 starts. I want step 3 to completely ignore the timing from step 2 so that step 3 will start when step 1 is complete. I don't want to use an offset on step 3, otherwise this begins a long chain of offset parameters that becomes more and more difficult to follow as the steps move on. Hope that makes sense, and thank you in advance for any help with this! //step 1 timeline.appendMultiple( [ TweenLite.to(mc1, 0.5, { x: 100 } ), TweenLite.to(mc2, 1.5, { x: 100 } ) ] ); //step 2 timeline.append(TweenLite.to(mc1, 2, { alpha: 0.5} ), -1); //step 3 timeline.append(TweenLite.to(mc2, 1, { alpha: 0.5} ));
  5. Hello, I'm wondering if its possible to continue a timeline if a specific tween is completed when using appendMultiple, rather than waiting for the longest tween to complete. I don't want to use onComplete with a function because the function won't be part of the timeline when I play the timeline in reverse. I would greatly appreciate help getting the following example to only move on to step 2 when mc1.x = 100 rather than when mc2.x = 100, without needing to use the offset parameter if possible, because the combination of so many offsets and differently timed tweens is becoming too difficult to follow in my code. //step 1 timeline.appendMultiple( [ TweenLite.to(mc1, 0.5, { x: 100 } ), TweenLite.to(mc2, 1, { x: 100 } ) ] ); //step 2 timeline.appendMultiple( [ TweenLite.to(mc1, 1, { x: 200 } ), TweenLite.to(mc2, 1, { x: 200 } ) ] ); Thanks, Matt
  6. Hello community, I'm using TimelineLite, which is amazing, but I'm having issues with tweens that have no duration. I need to have objects change position instantly but when I attempt to do so the object will start at that position when the timeline starts rather than changing to that position when I want it to. So in this basic example, mc2 will start at 200 BEFORE tweening to 100, instead of changing position instantly to 200 AFTER tweening to 100, yet mc1 is working as intended only because the duration of the 2nd tween is higher than 0: mc1.x = mc2.x = 0; timeline.appendMultiple( [ TweenLite.to(mc1, 1, { x: 100 } ), TweenLite.to(mc2, 1, { x: 100 } ) ] ); timeline.appendMultiple( [ TweenLite.to(mc1, 1, { x: 200 } ), TweenLite.to(mc2, 0, { x: 200 } ) ] ); Any help on how to change this example code to work the way I intended it to would be very much appreciated! Thanks, Matt
×
×
  • Create New...