Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set aspect-ratio to 16:9 #22

Closed
kongyuan opened this issue May 4, 2017 · 4 comments
Closed

How to set aspect-ratio to 16:9 #22

kongyuan opened this issue May 4, 2017 · 4 comments

Comments

@kongyuan
Copy link

kongyuan commented May 4, 2017

1: I can't set aspect-ratio to 16:9. I tried the val 16:9, 16/9, and I should not use 1.77777777..... I think.
2: After trying some times for problem 1, I can't set scale mode any more, it fix on USER-SCALE

@kongyuan
Copy link
Author

kongyuan commented May 4, 2017

When I set the width to 300 and height to 990, scale mode is user-scale, the game shows queer aspect-ratio

@rroylance
Copy link
Owner

300x990 is a very odd aspect ratio (3.33)...

To set the game to 16:9 you'd do the following for example;
npm run setupGameSize -- --width=1600 --height=900 --aspect-ratio=1.77

As for the scale mode, it needs to be set to one of Phasers included scale modes ('USER_SCALE', 'SHOW_ALL', 'EXACT_FIT', 'NO_SCALE', or 'RESIZE') (user-scale is not valid, USER_SCALE is though) so to add a new scale mode to the previous;
npm run setupGameSize -- --width=1600 --height=900 --aspect-ratio=1.77 --scale-mode=SHOW_ALL

Does that help you?

@kongyuan
Copy link
Author

kongyuan commented May 5, 2017

It's helps.
I just missed "=", It's different from most linux consle.
I set 300x990 to figure out how "USER_SCALE" works , and I still think there is some bugs.
In my opinion, "USER_SCALE" means whatever width and height is, aspect ratio still fixed, but in 300x990, height is too short, of course 300x990 is useless, I just worry about it will cause other problems.

@kongyuan
Copy link
Author

kongyuan commented May 5, 2017

Oh, my bad, 300x990 is browser window, not the game, game use 800X500, I forgot to tell in first time, sorry
Sorry for my bad english, BTW

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants