@tsparticles/vue2 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +147 -0
- package/dist/vue2-particles.js +230 -0
- package/dist/vue2-particles.min.js +1 -0
- package/package.json +139 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Matteo Bruni
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
[](https://particles.js.org)
|
|
2
|
+
|
|
3
|
+
# @tsparticles/vue2
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@tsparticles/vue2) [](https://www.npmjs.com/package/vue2-particles) [](https://github.com/sponsors/matteobruni)
|
|
6
|
+
|
|
7
|
+
Official [tsParticles](https://github.com/matteobruni/tsparticles) VueJS component
|
|
8
|
+
|
|
9
|
+
[](https://join.slack.com/t/tsparticles/shared_invite/enQtOTcxNTQxNjQ4NzkxLWE2MTZhZWExMWRmOWI5MTMxNjczOGE1Yjk0MjViYjdkYTUzODM3OTc5MGQ5MjFlODc4MzE0N2Q1OWQxZDc1YzI) [](https://discord.gg/hACwv45Hme) [](https://t.me/tsparticles)
|
|
10
|
+
|
|
11
|
+
[](https://www.producthunt.com/posts/tsparticles?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-tsparticles") <a href="https://www.buymeacoffee.com/matteobruni"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a beer&emoji=🍺&slug=matteobruni&button_colour=5F7FFF&font_colour=ffffff&font_family=Arial&outline_colour=000000&coffee_colour=FFDD00"></a>
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```shell script
|
|
16
|
+
yarn add @tsparticles/vue2
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```javascript
|
|
22
|
+
import Particles from "@tsparticles/vue2";
|
|
23
|
+
//import { loadFull } from "tsparticles"; // if you are going to use `loadFull`, install the "tsparticles" package too.
|
|
24
|
+
import { loadSlim } from "@tsparticles/slim"; // if you are going to use `loadSlim`, install the "@tsparticles/slim" package too.
|
|
25
|
+
|
|
26
|
+
Vue.use(Particles, {
|
|
27
|
+
init: async engine => {
|
|
28
|
+
// await loadFull(engine);
|
|
29
|
+
await loadSlim(engine);
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Demo config
|
|
35
|
+
|
|
36
|
+
```html
|
|
37
|
+
<template>
|
|
38
|
+
<div id="app">
|
|
39
|
+
<vue-particles id="tsparticles" :particlesLoaded="particlesLoaded" url="http://foo.bar/particles.json" />
|
|
40
|
+
|
|
41
|
+
<!-- or -->
|
|
42
|
+
|
|
43
|
+
<vue-particles
|
|
44
|
+
id="tsparticles"
|
|
45
|
+
:particlesLoaded="particlesLoaded"
|
|
46
|
+
:options="{
|
|
47
|
+
background: {
|
|
48
|
+
color: {
|
|
49
|
+
value: '#0d47a1'
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
fpsLimit: 120,
|
|
53
|
+
interactivity: {
|
|
54
|
+
events: {
|
|
55
|
+
onClick: {
|
|
56
|
+
enable: true,
|
|
57
|
+
mode: 'push'
|
|
58
|
+
},
|
|
59
|
+
onHover: {
|
|
60
|
+
enable: true,
|
|
61
|
+
mode: 'repulse'
|
|
62
|
+
},
|
|
63
|
+
resize: true
|
|
64
|
+
},
|
|
65
|
+
modes: {
|
|
66
|
+
bubble: {
|
|
67
|
+
distance: 400,
|
|
68
|
+
duration: 2,
|
|
69
|
+
opacity: 0.8,
|
|
70
|
+
size: 40
|
|
71
|
+
},
|
|
72
|
+
push: {
|
|
73
|
+
quantity: 4
|
|
74
|
+
},
|
|
75
|
+
repulse: {
|
|
76
|
+
distance: 200,
|
|
77
|
+
duration: 0.4
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
particles: {
|
|
82
|
+
color: {
|
|
83
|
+
value: '#ffffff'
|
|
84
|
+
},
|
|
85
|
+
links: {
|
|
86
|
+
color: '#ffffff',
|
|
87
|
+
distance: 150,
|
|
88
|
+
enable: true,
|
|
89
|
+
opacity: 0.5,
|
|
90
|
+
width: 1
|
|
91
|
+
},
|
|
92
|
+
move: {
|
|
93
|
+
direction: 'none',
|
|
94
|
+
enable: true,
|
|
95
|
+
outMode: 'bounce',
|
|
96
|
+
random: false,
|
|
97
|
+
speed: 6,
|
|
98
|
+
straight: false
|
|
99
|
+
},
|
|
100
|
+
number: {
|
|
101
|
+
density: {
|
|
102
|
+
enable: true,
|
|
103
|
+
area: 800
|
|
104
|
+
},
|
|
105
|
+
value: 80
|
|
106
|
+
},
|
|
107
|
+
opacity: {
|
|
108
|
+
value: 0.5
|
|
109
|
+
},
|
|
110
|
+
shape: {
|
|
111
|
+
type: 'circle'
|
|
112
|
+
},
|
|
113
|
+
size: {
|
|
114
|
+
value: { min: 1, max: 5 },
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
detectRetina: true
|
|
118
|
+
}"
|
|
119
|
+
/>
|
|
120
|
+
</div>
|
|
121
|
+
</template>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
```javascript
|
|
125
|
+
const particlesLoaded = async container => {
|
|
126
|
+
console.log("Particles container loaded", container);
|
|
127
|
+
};
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### TypeScript errors
|
|
131
|
+
|
|
132
|
+
If TypeScript returns error while importing/using Particles plugin try adding the following import before the previous
|
|
133
|
+
code:
|
|
134
|
+
|
|
135
|
+
```typescript
|
|
136
|
+
declare module "@tsparticles/vue2";
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Demos
|
|
140
|
+
|
|
141
|
+
The demo website is [here](https://particles.js.org)
|
|
142
|
+
|
|
143
|
+
<https://particles.js.org>
|
|
144
|
+
|
|
145
|
+
There's also a CodePen collection actively maintained and updated [here](https://codepen.io/collection/DPOage)
|
|
146
|
+
|
|
147
|
+
<https://codepen.io/collection/DPOage>
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { Prop, Component } from 'vue-property-decorator';
|
|
2
|
+
import { tsParticles } from '@tsparticles/engine';
|
|
3
|
+
import Vue from 'vue';
|
|
4
|
+
|
|
5
|
+
/******************************************************************************
|
|
6
|
+
Copyright (c) Microsoft Corporation.
|
|
7
|
+
|
|
8
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
9
|
+
purpose with or without fee is hereby granted.
|
|
10
|
+
|
|
11
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
12
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
13
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
14
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
15
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
16
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
17
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
18
|
+
***************************************************************************** */
|
|
19
|
+
|
|
20
|
+
function __decorate(decorators, target, key, desc) {
|
|
21
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
22
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
23
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
24
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
28
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
29
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
30
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
31
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
32
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
33
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
38
|
+
var e = new Error(message);
|
|
39
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const eventBus = new Vue();
|
|
43
|
+
|
|
44
|
+
function particlesInit(component) {
|
|
45
|
+
var _a;
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
if (!component.id) {
|
|
48
|
+
throw new Error("Prop 'id' is required!");
|
|
49
|
+
}
|
|
50
|
+
const cb = (container) => {
|
|
51
|
+
component.container = container;
|
|
52
|
+
if (component.container && component.particlesLoaded) {
|
|
53
|
+
component.particlesLoaded(component.container);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
const container = yield tsParticles.load({
|
|
57
|
+
id: component.id,
|
|
58
|
+
options: (_a = component.options) !== null && _a !== void 0 ? _a : {},
|
|
59
|
+
url: component.url,
|
|
60
|
+
});
|
|
61
|
+
cb(container);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
let Particles = class Particles extends Vue {
|
|
65
|
+
constructor() {
|
|
66
|
+
super(...arguments);
|
|
67
|
+
this.initHandler = () => __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
yield particlesInit(this);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
created() {
|
|
72
|
+
eventBus.$on("particles-init", this.initHandler);
|
|
73
|
+
}
|
|
74
|
+
mounted() {
|
|
75
|
+
this.$nextTick(() => {
|
|
76
|
+
particlesInit(this);
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
beforeDestroy() {
|
|
80
|
+
var _a;
|
|
81
|
+
(_a = this.container) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
82
|
+
eventBus.$off("particles-init", this.initHandler);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
__decorate([
|
|
86
|
+
Prop({ required: true })
|
|
87
|
+
], Particles.prototype, "id", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
Prop()
|
|
90
|
+
], Particles.prototype, "options", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
Prop()
|
|
93
|
+
], Particles.prototype, "url", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
Prop()
|
|
96
|
+
], Particles.prototype, "particlesLoaded", void 0);
|
|
97
|
+
Particles = __decorate([
|
|
98
|
+
Component
|
|
99
|
+
], Particles);
|
|
100
|
+
var script = Particles;
|
|
101
|
+
|
|
102
|
+
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
|
|
103
|
+
if (typeof shadowMode !== 'boolean') {
|
|
104
|
+
createInjectorSSR = createInjector;
|
|
105
|
+
createInjector = shadowMode;
|
|
106
|
+
shadowMode = false;
|
|
107
|
+
}
|
|
108
|
+
// Vue.extend constructor export interop.
|
|
109
|
+
const options = typeof script === 'function' ? script.options : script;
|
|
110
|
+
// render functions
|
|
111
|
+
if (template && template.render) {
|
|
112
|
+
options.render = template.render;
|
|
113
|
+
options.staticRenderFns = template.staticRenderFns;
|
|
114
|
+
options._compiled = true;
|
|
115
|
+
// functional template
|
|
116
|
+
if (isFunctionalTemplate) {
|
|
117
|
+
options.functional = true;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
// scopedId
|
|
121
|
+
if (scopeId) {
|
|
122
|
+
options._scopeId = scopeId;
|
|
123
|
+
}
|
|
124
|
+
let hook;
|
|
125
|
+
if (moduleIdentifier) {
|
|
126
|
+
// server build
|
|
127
|
+
hook = function (context) {
|
|
128
|
+
// 2.3 injection
|
|
129
|
+
context =
|
|
130
|
+
context || // cached call
|
|
131
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
132
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
|
|
133
|
+
// 2.2 with runInNewContext: true
|
|
134
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
135
|
+
context = __VUE_SSR_CONTEXT__;
|
|
136
|
+
}
|
|
137
|
+
// inject component styles
|
|
138
|
+
if (style) {
|
|
139
|
+
style.call(this, createInjectorSSR(context));
|
|
140
|
+
}
|
|
141
|
+
// register component module identifier for async chunk inference
|
|
142
|
+
if (context && context._registeredComponents) {
|
|
143
|
+
context._registeredComponents.add(moduleIdentifier);
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
// used by ssr in case component is cached and beforeCreate
|
|
147
|
+
// never gets called
|
|
148
|
+
options._ssrRegister = hook;
|
|
149
|
+
}
|
|
150
|
+
else if (style) {
|
|
151
|
+
hook = shadowMode
|
|
152
|
+
? function (context) {
|
|
153
|
+
style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
|
|
154
|
+
}
|
|
155
|
+
: function (context) {
|
|
156
|
+
style.call(this, createInjector(context));
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
if (hook) {
|
|
160
|
+
if (options.functional) {
|
|
161
|
+
// register for functional component in vue file
|
|
162
|
+
const originalRender = options.render;
|
|
163
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
164
|
+
hook.call(context);
|
|
165
|
+
return originalRender(h, context);
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
// inject component registration as beforeCreate hook
|
|
170
|
+
const existing = options.beforeCreate;
|
|
171
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return script;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/* script */
|
|
178
|
+
const __vue_script__ = script;
|
|
179
|
+
|
|
180
|
+
/* template */
|
|
181
|
+
var __vue_render__ = function () {
|
|
182
|
+
var _vm = this;
|
|
183
|
+
var _h = _vm.$createElement;
|
|
184
|
+
var _c = _vm._self._c || _h;
|
|
185
|
+
return _c("div", { attrs: { id: _vm.id } })
|
|
186
|
+
};
|
|
187
|
+
var __vue_staticRenderFns__ = [];
|
|
188
|
+
__vue_render__._withStripped = true;
|
|
189
|
+
|
|
190
|
+
/* style */
|
|
191
|
+
const __vue_inject_styles__ = undefined;
|
|
192
|
+
/* scoped */
|
|
193
|
+
const __vue_scope_id__ = undefined;
|
|
194
|
+
/* module identifier */
|
|
195
|
+
const __vue_module_identifier__ = undefined;
|
|
196
|
+
/* functional template */
|
|
197
|
+
const __vue_is_functional_template__ = false;
|
|
198
|
+
/* style inject */
|
|
199
|
+
|
|
200
|
+
/* style inject SSR */
|
|
201
|
+
|
|
202
|
+
/* style inject shadow dom */
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
const __vue_component__ = /*#__PURE__*/normalizeComponent(
|
|
207
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
208
|
+
__vue_inject_styles__,
|
|
209
|
+
__vue_script__,
|
|
210
|
+
__vue_scope_id__,
|
|
211
|
+
__vue_is_functional_template__,
|
|
212
|
+
__vue_module_identifier__,
|
|
213
|
+
false,
|
|
214
|
+
undefined,
|
|
215
|
+
undefined,
|
|
216
|
+
undefined
|
|
217
|
+
);
|
|
218
|
+
|
|
219
|
+
const VueParticles = {
|
|
220
|
+
install: (vue, options) => {
|
|
221
|
+
vue.component("vue-particles", __vue_component__);
|
|
222
|
+
if (options && options.init) {
|
|
223
|
+
options.init(tsParticles).then(() => {
|
|
224
|
+
eventBus.$emit("particles-init");
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
export { __vue_component__ as ParticlesComponent, VueParticles as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Prop as e,Component as t}from"vue-property-decorator";import{tsParticles as n}from"@tsparticles/engine";import o from"vue";function i(e,t,n,o){var i,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var d=e.length-1;d>=0;d--)(i=e[d])&&(s=(r<3?i(s):r>3?i(t,n,s):i(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}function r(e,t,n,o){return new(n||(n=Promise))((function(i,r){function s(e){try{c(o.next(e))}catch(e){r(e)}}function d(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,d)}c((o=o.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const s=new o;function d(e){var t;return r(this,void 0,void 0,(function*(){if(!e.id)throw new Error("Prop 'id' is required!");(t=>{e.container=t,e.container&&e.particlesLoaded&&e.particlesLoaded(e.container)})(yield n.load({id:e.id,options:null!==(t=e.options)&&void 0!==t?t:{},url:e.url}))}))}let c=class extends o{constructor(){super(...arguments),this.initHandler=()=>r(this,void 0,void 0,(function*(){yield d(this)}))}created(){s.$on("particles-init",this.initHandler)}mounted(){this.$nextTick((()=>{d(this)}))}beforeDestroy(){var e;null===(e=this.container)||void 0===e||e.destroy(),s.$off("particles-init",this.initHandler)}};function a(e,t,n,o,i,r,s,d,c,a){"boolean"!=typeof s&&(c=d,d=s,s=!1);const l="function"==typeof n?n.options:n;let p;if(e&&e.render&&(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),o&&(l._scopeId=o),r?(p=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,c(e)),e&&e._registeredComponents&&e._registeredComponents.add(r)},l._ssrRegister=p):t&&(p=s?function(e){t.call(this,a(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,d(e))}),p)if(l.functional){const e=l.render;l.render=function(t,n){return p.call(n),e(t,n)}}else{const e=l.beforeCreate;l.beforeCreate=e?[].concat(e,p):[p]}return n}i([e({required:!0})],c.prototype,"id",void 0),i([e()],c.prototype,"options",void 0),i([e()],c.prototype,"url",void 0),i([e()],c.prototype,"particlesLoaded",void 0),c=i([t],c);const l=c;var p=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{attrs:{id:e.id}})};p._withStripped=!0;const f=a({render:p,staticRenderFns:[]},undefined,l,undefined,false,undefined,!1,void 0,void 0,void 0),u={install:(e,t)=>{e.component("vue-particles",f),t&&t.init&&t.init(n).then((()=>{s.$emit("particles-init")}))}};export{f as ParticlesComponent,u as default};
|
package/package.json
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tsparticles/vue2",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "Official tsParticles Vue.js 2.x Component - Easily create highly customizable particle, confetti and fireworks animations and use them as animated backgrounds for your website. Ready to use components available also for Web Components, React, Vue.js 3.x, Angular, Svelte, jQuery, Preact, Riot.js, Solid.js, Inferno.",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"clean": "rm -rf dist/*",
|
|
7
|
+
"build": "npm run clean && pnpm run prettify:src && pnpm run prettify:readme && rollup -c",
|
|
8
|
+
"build:ci": "npm run clean && pnpm run prettify:ci:src && pnpm run prettify:ci:readme && rollup -c",
|
|
9
|
+
"prettify:ci:src": "prettier --check ./src/*",
|
|
10
|
+
"prettify:ci:readme": "prettier --check ./README.md",
|
|
11
|
+
"prettify:src": "prettier --write ./src/*",
|
|
12
|
+
"prettify:readme": "prettier --write ./README.md",
|
|
13
|
+
"prepack": "pnpm run build"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"front-end",
|
|
17
|
+
"frontend",
|
|
18
|
+
"tsparticles",
|
|
19
|
+
"particles.js",
|
|
20
|
+
"particlesjs",
|
|
21
|
+
"particles",
|
|
22
|
+
"particle",
|
|
23
|
+
"canvas",
|
|
24
|
+
"jsparticles",
|
|
25
|
+
"xparticles",
|
|
26
|
+
"particles-js",
|
|
27
|
+
"particles-bg",
|
|
28
|
+
"particles-bg-vue",
|
|
29
|
+
"particles-ts",
|
|
30
|
+
"particles.ts",
|
|
31
|
+
"react-particles-js",
|
|
32
|
+
"react-particles.js",
|
|
33
|
+
"react-particles",
|
|
34
|
+
"react",
|
|
35
|
+
"reactjs",
|
|
36
|
+
"vue-particles",
|
|
37
|
+
"ngx-particles",
|
|
38
|
+
"angular-particles",
|
|
39
|
+
"particleground",
|
|
40
|
+
"vue",
|
|
41
|
+
"vuejs",
|
|
42
|
+
"preact",
|
|
43
|
+
"preactjs",
|
|
44
|
+
"jquery",
|
|
45
|
+
"angularjs",
|
|
46
|
+
"angular",
|
|
47
|
+
"typescript",
|
|
48
|
+
"javascript",
|
|
49
|
+
"animation",
|
|
50
|
+
"web",
|
|
51
|
+
"html5",
|
|
52
|
+
"web-design",
|
|
53
|
+
"webdesign",
|
|
54
|
+
"css",
|
|
55
|
+
"html",
|
|
56
|
+
"css3",
|
|
57
|
+
"animated",
|
|
58
|
+
"background",
|
|
59
|
+
"confetti",
|
|
60
|
+
"canvas",
|
|
61
|
+
"fireworks",
|
|
62
|
+
"fireworks-js",
|
|
63
|
+
"confetti-js",
|
|
64
|
+
"confettijs",
|
|
65
|
+
"fireworksjs",
|
|
66
|
+
"canvas-confetti"
|
|
67
|
+
],
|
|
68
|
+
"main": "dist/vue2-particles.js",
|
|
69
|
+
"module": "dist/vue2-particles.js",
|
|
70
|
+
"unpkg": "dist/vue2-particles.min.js",
|
|
71
|
+
"jsdelivr": "dist/vue2-particles.min.js",
|
|
72
|
+
"repository": {
|
|
73
|
+
"url": "https://github.com/tsparticles/vue2",
|
|
74
|
+
"type": "git",
|
|
75
|
+
"directory": "components/vue2"
|
|
76
|
+
},
|
|
77
|
+
"author": "Matteo Bruni <matteo.bruni@me.com>",
|
|
78
|
+
"license": "MIT",
|
|
79
|
+
"files": [
|
|
80
|
+
"dist"
|
|
81
|
+
],
|
|
82
|
+
"bugs": {
|
|
83
|
+
"url": "https://github.com/tsparticles/vue2/issues"
|
|
84
|
+
},
|
|
85
|
+
"homepage": "https://particles.js.org",
|
|
86
|
+
"funding": [
|
|
87
|
+
{
|
|
88
|
+
"type": "github",
|
|
89
|
+
"url": "https://github.com/sponsors/matteobruni"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"type": "github",
|
|
93
|
+
"url": "https://github.com/sponsors/tsparticles"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"type": "buymeacoffee",
|
|
97
|
+
"url": "https://www.buymeacoffee.com/matteobruni"
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"prettier": "@tsparticles/prettier-config",
|
|
101
|
+
"peerDependencies": {
|
|
102
|
+
"vue": "<3"
|
|
103
|
+
},
|
|
104
|
+
"publishConfig": {
|
|
105
|
+
"access": "public"
|
|
106
|
+
},
|
|
107
|
+
"dependencies": {
|
|
108
|
+
"@tsparticles/engine": "^3.0.2",
|
|
109
|
+
"vue-class-component": "^7.2.6",
|
|
110
|
+
"vue-property-decorator": "^9.1.2"
|
|
111
|
+
},
|
|
112
|
+
"devDependencies": {
|
|
113
|
+
"@babel/core": "^7.22.19",
|
|
114
|
+
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
115
|
+
"@babel/plugin-proposal-decorators": "^7.22.15",
|
|
116
|
+
"@rollup/plugin-node-resolve": "^15.2.1",
|
|
117
|
+
"@rollup/plugin-replace": "^5.0.2",
|
|
118
|
+
"@tsparticles/prettier-config": "^1.12.0",
|
|
119
|
+
"@vue/cli-plugin-babel": "~5.0.8",
|
|
120
|
+
"@vue/cli-plugin-typescript": "~5.0.8",
|
|
121
|
+
"@vue/cli-service": "~5.0.8",
|
|
122
|
+
"is-svg": "^5.0.0",
|
|
123
|
+
"postcss": "^8.4.29",
|
|
124
|
+
"prettier": "^3.0.3",
|
|
125
|
+
"pug": "^3.0.2",
|
|
126
|
+
"rollup": "^2.79.1",
|
|
127
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
128
|
+
"rollup-plugin-typescript": "^1.0.1",
|
|
129
|
+
"rollup-plugin-typescript2": "^0.35.0",
|
|
130
|
+
"rollup-plugin-vue": "^5.1.9",
|
|
131
|
+
"ssri": "^10.0.5",
|
|
132
|
+
"tslib": "^2.6.2",
|
|
133
|
+
"typescript": "^5.2.2",
|
|
134
|
+
"vue": "^2.7.14",
|
|
135
|
+
"vue-loader": "^15.10.2",
|
|
136
|
+
"vue-template-compiler": "^2.7.14"
|
|
137
|
+
},
|
|
138
|
+
"gitHead": "4329892fd535c7e35dc3123ca60d8d936f630776"
|
|
139
|
+
}
|