Search the Community
Showing results for tags 'conditionals'.
**See Codepen URL** I'm trying to create a simple sequence that fades out "Test" after 4 seconds, and then fade out "Rest" after 2 seconds. "Best" will remain. When I append outside of the "if" statement, the sequence works—but inside of the statement—it does not register. I am able to detect as existing all of the elements (div, array, timeline object, etc) in the statement with the console log. It appears though that appending a sequence from an embedded "if" statement will not work. It has to be done on the root level with the Timeline object. Is this correct? Or is there a way to make this work with my current setup? (I've added notations to the code.) Thanks!
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.