GithubHelp home page GithubHelp logo

Comments (4)

kongyuan avatar kongyuan commented on May 20, 2024

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

from phaser-ce-npm-webpack-typescript-starter-project.

rroylance avatar rroylance commented on May 20, 2024

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?

from phaser-ce-npm-webpack-typescript-starter-project.

kongyuan avatar kongyuan commented on May 20, 2024

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.

from phaser-ce-npm-webpack-typescript-starter-project.

kongyuan avatar kongyuan commented on May 20, 2024

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

from phaser-ce-npm-webpack-typescript-starter-project.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.