Examples

Imperative Escape Hatch

Use Vue for UI state and keep hot-path movement inside the scene update loop.

The imperative example demonstrates the boundary this library is built around. Vue toggles a low-frequency turbo flag. Phaser handles the per-frame movement.

examples/vue/imperative-escape-hatch/src/App.vue
scene.events.on('update', (_time, delta) => {
  orb.x += velocity * (delta / 1000)
  if (orb.x > 840)
    orb.x = -40
})

That scene code stays clear because the library does not try to force per-frame state into reactive props.

If motion changes every frame, keep it imperative. Vue should coordinate intent, not animate the whole world tree.
Copyright © 2026