Jump to content

setTimer and moveObject - question


2kristof2

Recommended Posts

Posted

Hey! I have a question ;)

If I set too many timers at the same time they cause lags, because setTimer is resource-intensive;

if I use many moveObject functions they also will cause lags (fps drops)?

I'm asking because I used many timers and I had to remove them because they didn't work effectively. I don't want to have similar problem with moveObject. I'd rather use interpolateBetween or something.

thanks!

Posted

moveObject shouldn't cause you any performance problems.

interpolateBetween will only calculate the positions, you'll have to use setElementPosition to move the element on render.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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