Jump to content

gsap on requestAnimationFrame(), how to optimize?


nishaant
 Share

Recommended Posts

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:

  1. will it destroy my program in long run?
  2. should i bother about it and optimize it?
  3. will it create multiple gsap threads?
  4. how to optimize/destroy old gsap in next requestAnimationFrame?
Edited by nishaant
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...