Asteroids-2026/js/main.js

23 lines
652 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,
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);