nishaant Posted April 8, 2021 Share Posted April 8, 2021 (edited) Quote requestAnimationFrame(animate); //will run on every 0.016 sec function animate(){ gsap.from(heart.scale, { x: 2, y: 2, duration: 0.100}) //will run for 0.100 sec i.e. longer than next requestAnimationFrame() } so my gsap duration is longer than next requestAnimationFrame(), lets say 2secs my ques: will it destroy my program in long run? should i bother about it and optimize it? will it create multiple gsap threads? how to optimize/destroy old gsap in next requestAnimationFrame? Edited April 8, 2021 by nishaant Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted April 8, 2021 Share Posted April 8, 2021 Why do you need multiple gsap threads? Also , that's how you use single RAF for both pixi and gsap: https://pixijs.io/examples/#/gsap3-interaction/gsap3-tick.js , and there are other examples. Please read them and then make question more understandable nishaant and karlbot 1 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.