Jump to content

Preventing redraws on every frame


cvshepherd
 Share

Recommended Posts

Not directly, but if you're willing to get your hands dirty it would be a trivial thing to add. I would modify Game.update so that the render block at the bottom looked like this:

        if (this.renderType != Phaser.HEADLESS && this.dirty)        {            this.renderer.render(this.stage);            this.plugins.render();            this.state.render();            this.plugins.postRender();            this.dirty = false;        }

(also add in the dirty property to Game.js)

Then you'd just set game.dirty = true in your game to force it to render.

Link to comment
Share on other sites

  • 4 weeks later...
 Share

  • Recently Browsing   0 members

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