1
\$\begingroup\$

I am building a javascript HTML5 canvas game and I need to scale the map. However whenever I scale my map the screen stutters very obviously. To scale smoothly without player noticing I add Tween effect using Greensock TweenMax. I put the codes gsap.TweenMax.to(...) inside my animation update loop, right after requestAnimationFrame method. But I realize that the TweenMax may have its own ticker in animation and it handles animation internally. But the codes work very well. Does that implementation has any side effect? What is the correct place to put my tweening codes? Should I implement my own code inside the update loop?

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.