app').If you obtain a mistake along with TS, make an effort use( Vue3Spline, title: "Vue3Spline" ).To determine global parts for Volar type-checking you will definitely need to have to include:.// components.d.ts.state module '@vue/ runtime-core' export user interface GlobalComponents SplineAnimation: typeof import(' vue3-spline') [' Vue3Spline']export {-String.Split-|-}If needed rename element to make use of:.app.use( Vue3Spline, name: 'SplineAnimation')// use in template.title cord (nonpayment: 'Vue3Spline') - prepared custom-made component title.Additionally you may additionally import the element locally.import Vue3Spline coming from 'vue3-spline'.export nonpayment elements: Vue3Spline,.,.You can easily after that use the part in your design template.
Nuxt 3.This is actually still speculative. Will certainly be improved very soon.You can easily mount vue3-spline over anecdote or even npm. spline-runtime is a dependency of vue3-spline and also must be instantly set up when you install vue3-spline.If you are using npm:.npm put in vue3-spline@latest-- conserve.If you are actually using anecdote:.yarn incorporate vue3-spline@latest.Make a folder contacted plugins at the origin of your task.Make a file called Vue3Spline.client.ts inside the plugins directory site.Incorporate the adhering to code to the Vue3Spline.client.ts documents.import Vue3Spline from 'vue3-spline'.export nonpayment defineNuxtPlugin(( nuxtApp) => nuxtApp.vueApp.use( Vue3Spline). ).If you get an error with TS, make an effort use( Vue3Spline, name: "Vue3Spline" ).This should enroll as a global part that you can easily refer to as anywhere in your application under the tag.I will recommend utilizing a moms and dad tag to make sure that the computer animation merely loads in on the client side.
Github.