Jump to content

Changing how often a tween updates


Yora
 Share

Recommended Posts

Hiya,

 

I'm regularly tweening a large object across my screen and notice some small skips/jumps of the tweening object when tested on mobile.  Is there a way I can lower how often the tween updates and redraws the object on the way to its destination to perhaps cut down on rendering?

 

I generally use timed events like this to achieve a slower update call:

this.game.time.events.repeat(100, 10, this.f_fade_in, g_floor);

but it would be useful (i'm hoping) to take the same kind of action on a tween itself.

Link to comment
Share on other sites

The object will still be rendered once per frame, even if the tween doesn't update. Tweens are very light, and generally speaking tweening most properties won't affect the framerate to any noticeable degree. What you're seeing is more likely to be hitching due to garbage collection going on elsewhere in your code, or a vertical sync issue between Phaser and the browser when your framerate isn't consistent.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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