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

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...