cvshepherd Posted April 29, 2014 Share Posted April 29, 2014 hi,is there a way to prevent the complete redrawing of the canvas on each new frame? Link to comment Share on other sites More sharing options...
rich Posted April 29, 2014 Share Posted April 29, 2014 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 More sharing options...
cvshepherd Posted May 27, 2014 Author Share Posted May 27, 2014 Sorry for the late answer. Was busy with back end stuff. This works great. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts