/* * Copyright (c) 2020. Pascal Syma * All rights reserved. */ import Phaser from "phaser"; import Menu from "./scenes/Menu"; const ratio = 16 / 9; // any ratio you want, 16/9 landscape or 9/16 portrait const DEFAULT_HEIGHT = 1080; // any height you want const DEFAULT_WIDTH = ratio * DEFAULT_HEIGHT; const config = { type: Phaser.AUTO, scale: { mode: Phaser.Scale.FIT, autoCenter: Phaser.Scale.CENTER_BOTH, width: DEFAULT_WIDTH, height: DEFAULT_HEIGHT }, parent: "phaser-example", scene: [Menu], // pixelArt: true, // roundPixels: true }; const game = new Phaser.Game(config);