Jump to content

Game doesn't center on browser with scale and resize to fill


gaelbeltran
 Share

Recommended Posts

Hello, I just found this and I'm not sure if that's the intended way.

 

My configuration is:

game.config = {    system: {        width: 800,        height: 500,        center: true,        scale: true,        resize: true            }};

I'm using a background image of size 888*600 so it covers the sides if the windows is too wide or the top and bottom if the screen is too high.

 

I'm adding my background the usual way, in the pandajs dev generated project:

var test = new game.Sprite('test.png');test.addTo(this.stage);

But my game looks like this:

http://imgur.com/YXYP3Tf

 

The gray borders only appear at the right instead of left and right, is it correct to assume that pandajs is putting the game canvas to the left? How can I solve this?

 

 

Btw, this engine is really good! Object pooling, scaling options, tweens, texture packer support. It has everything I need.

Link to comment
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...
 Share

  • Recently Browsing   0 members

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