28 lines
891 B
JavaScript
28 lines
891 B
JavaScript
import BootScene from './scenes/BootScene.js';
|
|
import MenuScene from './scenes/MenuScene.js';
|
|
import GameScene from './scenes/GameScene.js';
|
|
import CRTPipeline from './pipelines/CRTPipeline.js';
|
|
|
|
const config = {
|
|
type: Phaser.WEBGL, // Required for PostFXPipeline (CRT shader)
|
|
width: 1600,
|
|
height: 900,
|
|
scale: {
|
|
mode: Phaser.Scale.FIT, // This will scale to fit the screen
|
|
autoCenter: Phaser.Scale.CENTER_BOTH, // Center both horizontally and vertically
|
|
parent: 'game-container' // Optional: specify parent container
|
|
},
|
|
backgroundColor: '#000011',
|
|
pipeline: { CRTPipeline }, // Registers the pipeline by class name
|
|
physics: {
|
|
default: 'arcade',
|
|
arcade: {
|
|
gravity: { x: 0, y: 0 },
|
|
debug: false
|
|
}
|
|
},
|
|
scene: [BootScene, MenuScene, GameScene]
|
|
};
|
|
|
|
new Phaser.Game(config);
|