Sun0fABeach/vue-phaser3
소개
Vue 3 + Phaser 3 + Webpack Template
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- -1
- in 15 days
- -1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalvue-phaser3
Webpack boilerplate that integrates Phaser 3 into a Vue 3 project.
This project template has been set up using the Vue CLI 5 and includes:
- Sass
- CSS Postprocessing
- Babel
- Source Minification
Build Setup
# install dependencies
npm install
# serve with live reloading at localhost:8080
npm run serve
# build for production with transpilation / minification
npm run build
# serve your production build at localhost:5000
npm start
Extending the project to your needs
If you want to add more features like linting, unit testing or Typescript to your own project, you can do so quite easily via Vue CLI's plugin system. Read the documentation if you want to know more.
Converting into your own repository
If you want to maintain your own repo based on this boilerplate, you first need to detach it from this repo. Here is what you need to do:
edit these files and enter your own project info
- package.json
- README.md
- public/index.html
delete LICENSE (and perhaps add your own)
reinitialize git
rm -rf .git
git init
git add .
git commit -m "Initial commit"
Sharing data between Vue and Phaser
You might want to expose some game state that lives inside of your Phaser code to your Vue components and vice versa, for example a highscore. Here are two ways you can achieve sharing state between the frameworks.
Import a Phaser EventEmitter instance in both your Vue components and Phaser modules. Both sides can then listen to and emit events on that emitter.
Have both sides share a Pinia store instance. It works like an event emitter, but can also hold state. The Pinia store is nicely integrated into your Vue components and is easily accessible on the Phaser side by applying the useStore hook.
관련 프로젝트 살펴보기
불러오는 중…