bubbut Posted August 14, 2014 Share Posted August 14, 2014 Sorry if this has been asked many times. I looked through a few threads but couldn't get it working. I'm just trying to make my game resize as user resizes window or if the orientation is switched (on phone). I tried hooking into $(window).resize but it kept complaning that 'game' is undefined. I'm using TypeScript for my game. Any help would be greatly appreciated! Link to comment Share on other sites More sharing options...
Pedro Alpera Posted August 14, 2014 Share Posted August 14, 2014 Look this template: https://github.com/photonstorm/phaser/tree/master/resources/Project%20Templates/Full%20Screen%20Mobile Link to comment Share on other sites More sharing options...
bubbut Posted August 18, 2014 Author Share Posted August 18, 2014 Pedro, I looked at that sample and tried adding scale.hasResized.add(...) along with the function to the desktop mode but it doesn't work. It only fired the first time I run the game, but any subsequent window resize did nothing. I would like to have the game always be fully stretched to the entire browser window (up to some minimum/maximum size) whenever user resizes the window. Is that possible? Link to comment Share on other sites More sharing options...
Recommended Posts