sun0fabeach / vue-phaser3 Goto Github PK
View Code? Open in Web Editor NEWVue 3 + Phaser 3 + Webpack Template
License: MIT License
Vue 3 + Phaser 3 + Webpack Template
License: MIT License
I am using Phaser with Vue.js also. But I have a hard time to figure out why I use it with Vue.js 😄 ?
What is the benefit of using Phaser with Vue.js? Love to hear some good reasons!
Hi..I have a problem when working on project on serve mode using vue-cli-service serve. When I open the application, thus the chunk game is loaded but when I change something in the application and reload the page I get this error..
Error in mounted hook (Promise/async): "ChunkLoadError: Loading chunk game failed.
How to adapt this template to Quasar framework? Should I use Quasar boot file to initialize Phaser or rather Game component will work as it is?
The issue seems to be with the components/Game.vue. The div is broken and there should only be one item in the template tag. This should fix the issue:
<template>
<div>
<div id="game-container"></div>
<div class="placeholder" v-if="!downloaded">
Downloading ...
</div>
</div>
</template>
Looking forward to your answer!
This is the first time I have built a project in this way,Want to use spine plug-ins.But I don't know what to do.
This line causes an error on Heroku deployment:
const game = await import(/* webpackChunkName: "game" */ '@/game')
This dependency was not found:
* @/game in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/Game.vue?vue&type=script&lang=js&
To install it, you can run: npm install --save @/game
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `vue-cli-service build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.o4QiG/_logs/2020-05-26T10_47_11_732Z-debug.log
-----> Build failed
Same line of code is working on local dev and local build.
Hi, thank you for providing this template. It's really helpful. :)
There's a small issue I'd like to point out with the current source.
// game.vue
unmounted() {
this.gameInstance.destroy(false)
}
Hello,
It's more a question than really an issue.
I didn't use all of your code, but tried to integrate most of it to my current project.
in Game.vue, in the mounted() event, you did this :
mounted() {
import(/* webpackChunkName: "game" */ '@/game/game').then(game => {
this.downloaded = true
this.$nextTick(() => game.launch())
})
}
There it crashes for me, stating that import can only appear at top level.
But then I notice there is an annotation for webpack...
Any lead on how this works ?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.