import Phaser from 'phaser'
import BootScene from '@/game/scenes/BootScene'
import PlayScene2 from '@/game/scenes/PlayScene2'

function launch(containerId: string) {
    return new Phaser.Game({
        type: Phaser.CANVAS,
        parent: containerId,
        backgroundColor: '#090A20',
        physics: {
            default: 'arcade',
            arcade: {
                gravity: { y: 300 },
                debug: false
            }
        },
        scale: {
            mode: Phaser.Scale.ENVELOP,
            width: 800,
            height: 1024
        },
        scene: [BootScene, PlayScene2]
    })
}

export default launch
export { launch }
