Sign in to follow this  
Le Twitch

newbie need help understanding scaleManager

Recommended Posts

i need some help understanding as to what ScaleManager and setScreenSize(true); do.

this.game.scaleMode = Phaser.ScaleManager.SHOW_ALL;this.game.scale.setScreenSize(true);

Share this post


Link to post
Share on other sites

The first line makes the game canvas scale up uniformly to fill as much of the container as it can. It will never causes the game to become 'stretched' in one direction or another, nor will it ever crop parts out.

 

The second line simply tries to set the canvas to the size of the screen.

Share this post


Link to post
Share on other sites

The first line makes the game canvas scale up uniformly to fill as much of the container as it can. It will never causes the game to become 'stretched' in one direction or another, nor will it ever crop parts out.

 

The second line simply tries to set the canvas to the size of the screen.

 

does this mean that you don't need both of those lines if the size of the game is the same size as the screen?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.