API Reference
Vue Components
Public component surface for PhaserGame, PhaserScene, and the alpha primitive set.
PhaserGame
PhaserGame owns Phaser.Game and provides the per-instance scope.
width and height size both the outer host element and the Phaser canvas mount. Use percentage values such as 100% when the parent already owns layout.
Key props:
configsceneswidthheightpixelArttransparentbackgroundColorautoFocusautoStartinstanceIddebugsuspendWhenHiddenhmrStrategyassetsBaseUrl
Events:
readydestroyederror
Exposed refs:
gamemountedcontainerElbridge
PhaserScene
PhaserScene registers a managed scene with the nearest PhaserGame.
Props:
sceneKeydefinitionactivevisibleautoStart
Primitive components
The alpha primitives are:
PhaserContainerPhaserImagePhaserSpritePhaserText
All primitives:
- create exactly one Phaser object
- wait until the active scene is ready
- support
@ready - destroy cleanly on unmount
- expose the raw object through refs
The primitives are a convenience layer, not a renderer. Constructor-only identity changes warn instead of hiding a destroy-and-recreate cycle.