Examples

Minimal

The smallest example that proves the host, scene registration, and typed bridge flow.

The minimal Vite example shows the recommended baseline: one host, one scene, and one bridge event flowing from DOM UI into Phaser scene code.

The source lives in examples/vue/minimal. It uses definePhaserScene, usePhaserBridge, PhaserGame, and PhaserScene.

examples/vue/minimal/src/App.vue
<PhaserGame
  instance-id="minimal-demo"
  :width="800"
  :height="480"
  background-color="#16213e"
  debug
>
  <PhaserScene scene-key="main" :definition="scene" />
</PhaserGame>

That example is the right place to copy from when you want to prove the runtime wiring before you introduce more scenes or DOM controls.

Copyright © 2026