VisibilityDevice provides the game with a way of knowing if it is visible or not, by hooking into the HTML5 Page Visibility .
Code to run when the page gains visibility
Code to run when the page loses visibility
VisibilityDevice provides the game with a way of knowing if it is visible or not, by hooking into the HTML5 Page Visibility .