phavuer
v0.16.2
Published
A wrapper library that integrates Phaser 3 with Vue 3.
Downloads
441
Readme
Phavuer
Phavuer is a wrapper library that integrates Phaser 3 with Vue 3.
It allows you to control Phaser, a JavaScript game engine, through Vue, and enables game development through declarative rendering.
<template>
<Game :config="gameConfig">
<Scene name="MainScene">
<Text @pointerdown="onClick" text="Add a Rectangle" />
<Container v-for="(n, i) in count" :key="i" :x="i * 130" :y="30">
<Rectangle :width="120" :height="30" :origin="0" :fillColor="0x333333" />
<Text :x="60" :y="15" :origin="0.5" :text="`Rectangle-${n}`" />
<MyCustomComponent />
</Container>
</Scene>
</Game>
</template>
<script setup>
import { Game, Scene, Container, Rectangle, Text } from 'phavuer'
import { ref } from 'vue'
import MyCustomComponent from './MyCustomComponent.vue'
const gameConfig = { .. }
const count = ref(1)
const onClick = () => count.value++
</script>
Documentation
- Phavuer https://phavuer.laineus.com
- Phaser3 https://newdocs.phaser.io/docs/3.70.0
Examples
- Phavuer vs Phaser's plane API - A Compilation by example UI.
- Phavuer Example Shooter - A simple shooter that written in Phavuer.
- Phavuer RPG Example - An RPG example (This is just a usage example. Not a completed Game.)
- "The Dream Libra had" - An RPG made with Phavuer (Completed project and published on Steam).