rexplugin_main


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: 950,
    height: 550,
    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: 300 },
     debug: false,
   },
},
plugins: {
  global: [{
  key: 'rexVirtualJoystick',
  plugin: VirtualJoystickPlugin,
  start: true
 },
]
},
   scene: [GameScene],
};
window.addEventListener('load', () => {
    new Phaser.Game(config);
});