tsparticles / vue3

Vue.js tsParticles official component
MIT License
125 stars 8 forks source link

installation is unclear #4

Closed 34r7h closed 1 year ago

34r7h commented 1 year ago

after the template tag, where does the js go?

matteobruni commented 1 year ago

The use(Particles) must go where the createApp is, the other code must go in the script of the component.

You can see a sample here: https://github.com/tsparticles/vue3/blob/41dba6a7eeff8dfc22eccd06c7f5f7a331cc0e53/apps/vue3/src/App.vue#L2

34r7h commented 1 year ago

thanks Matteo. Still having trouble after copying the example.

i downloaded the vue3/apps/vue3 folder but can't install.. getting npm ERR! 404 Not Found - GET https://registry.npmjs.org/@tsparticles%2fvue3 - Not found.

i think the npm registry is looking for a different name now. vue3-particles now?

matteobruni commented 1 year ago

thanks Matteo. Still having trouble after copying the example.

i downloaded the vue3/apps/vue3 folder but can't install.. getting npm ERR! 404 Not Found - GET https://registry.npmjs.org/@tsparticles%2fvue3 - Not found.

i think the npm registry is looking for a different name now. vue3-particles now?

@tsparticles/vue3 will be the new package, but it's something it's not ready to be published yet. The legacy branch contains all the v2 packages like vue3-particles

34r7h commented 1 year ago

great, ok i'll keep in mind when upgrading. Thanks much.

I got it to work after fixing a mistake.. app.use(router).use(Particles); like you gave in the example.

where I had:

createApp(App).use(Particles);
app.use(createPinia())
app.use(router)

maybe that makes two instances.

matteobruni commented 1 year ago

The default Vue3 app comes with app.use(router);, that's why I appended that there.

34r7h commented 1 year ago

yeah it should be there. i made an error. great work on this repo. i'm very thankful!