import * as Phaser from 'phaser';
import VirtualJoystickPlugin from 'phaser4-rex-plugins/plugins/virtualjoystick-plugin.js';
import { GameScene } from './scenes/GameScene';
const config: Phaser.Types.Core.GameConfig = {
type: Phaser.AUTO,
width: 1024,
height: 1024,
backgroundColor: '#cccccc',
// antialias: false,
disableContextMenu: true,
banner: false,
scale: {
mode: Phaser.Scale.FIT,
autoCenter: Phaser.Scale.CENTER_BOTH },
parent: 'app',
physics: {
default: 'arcade',
arcade: {
gravity: { x: 0, y: 0 },
debug: false,
},
},
plugins: {
global: [{
key: 'rexVirtualJoystick',
plugin: VirtualJoystickPlugin,
start: true
},
]
},
scene: [GameScene],
};
window.addEventListener('load', () => {
new Phaser.Game(config);
});