import Phaser from 'phaser';
import { Stage, STAGE_W, STAGE_H } from './scenes/stage';
import { Title } from './scenes/title';

new Phaser.Game({
  type: Phaser.AUTO,
  width: STAGE_W,
  height: STAGE_H,
  backgroundColor: '#efe4cb', // warm washi paper
  parent: 'app',
  scale: {
    // letterbox onto phones/tablets; pointer coords stay in stage space.
    mode: Phaser.Scale.FIT,
    autoCenter: Phaser.Scale.CENTER_BOTH,
  },
  input: { activePointers: 3 }, // drag + grip button + spare finger
  physics: {
    default: 'matter',
    matter: { gravity: { x: 0, y: 1 }, autoUpdate: false, debug: false },
  },
  scene: [Stage, Title],
});
