vue-phaserjs

A component library to integrate Phaser Framework with Vue.
8,808 23
Install
npm install vue-phaserjs
Latest Version:4.3.3
Vue:3
License:Apache-2.0
Last Updated:Oct 22, 2026
Links: GitHub  ·  npm
Maintainer: q16solver

vue-phaserjs

Apache-2.0 licensed NPM version NPM downloads NPM Unpacked Size (with version)

Inspired by phavuer.

Vue integration for the Phaser game engine. Provides Vue components and composables that bridge Phaser scenes, game objects, and Pinia state with the Vue component lifecycle.

Table of Contents


🚀 Getting Started

pnpm i vue-phaserjs @esposter/shared parse-tmx vue phaser phaser4-rex-plugins pinia

Add the type declaration files so scene key types and custom plugins get proper intellisense:

📖 Documentation

We highly recommend you take a look at the documentation to level up.

Usage

See the reference implementation in apps/web/app/pages/dungeons.vue for a complete example of a Phaser game embedded in a Nuxt/Vue page with Pinia-driven state.

Features

  • Vue components wrapping Phaser Game, Scene, and common game objects
  • Reactive Pinia integration — game state flows naturally through Vue's reactivity system
  • Scene lifecycle hooks aligned with Vue's onMounted / onUnmounted
  • TypeScript-first with full generic scene key support

Commands

Run from packages/vue-phaserjs/:

pnpm build        # compile to dist/
pnpm test         # vitest watch mode (coverage is run from the repo root)
pnpm lint:fix     # auto-fix lint
pnpm typecheck    # type check

⚖️ License

This project is licensed under the Apache-2.0 license.

Related Packages

nuxtjs-phaser

Empower your Phaser game with Vue/Nuxt

1,559 11
@pinia/nuxt

Nuxt Module for pinia

34,268,649 14,743
@pinia-orm/nuxt

Nuxt module for pinia-orm

50,755 528
@tauri-store/pinia

Persistent Pinia stores for Tauri

21,382 137
@innertia-solutions/innertia-nuxt

Innertia Solutions — Nuxt layer unificada: core, auth, multitenancy, theme y app...

10,387 0

Version History

Version Released License
4.3.3 Apache-2.0
4.3.1 Apache-2.0
4.2.0 Apache-2.0
4.1.2 Apache-2.0
4.1.1 Apache-2.0