Jump to content

Force use of setTimeout over requestAnimationFrame?


codevinsky
 Share

Recommended Posts

You can do this using a game configuration object and set the property forceSetTimeOut to true.

 

Understand that some browsers will still pause the game for you though, regardless. iOS in particular will freeze all  JavaScript execution when you swap out or to another tab, no matter how you update the game.

Link to comment
Share on other sites

game config was introduced in 1.1.4. Here is how you'd do it:

var config = {  width: 800,  height: 600,  renderer: Phaser.AUTO,  parent: 'yourDivID',  transparent: false,  antialias: true,  forceSetTimeOut: true}var game = new Phaser.Game(config);// now add your states here
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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