mirror of
https://github.com/tobspr-games/shapez.io.git
synced 2026-01-21 12:02:41 -08:00
Fix game on small resolutions
This commit is contained in:
parent
8454a782b4
commit
e4f8d3b569
1 changed files with 5 additions and 1 deletions
|
|
@ -168,7 +168,11 @@ export class Camera extends BasicSerializableObject {
|
|||
* Finds a good initial zoom level
|
||||
*/
|
||||
findInitialZoom() {
|
||||
const desiredWorldSpaceWidth = 18 * globalConfig.tileSize;
|
||||
let desiredWorldSpaceWidth = 18 * globalConfig.tileSize;
|
||||
if (window.innerWidth < 1000) {
|
||||
desiredWorldSpaceWidth = 12 * globalConfig.tileSize;
|
||||
}
|
||||
|
||||
const zoomLevelX = this.root.gameWidth / desiredWorldSpaceWidth;
|
||||
const zoomLevelY = this.root.gameHeight / desiredWorldSpaceWidth;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue