tsparticles 2.0.6 → 2.1.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/README.md +26 -15
- package/package.json +11 -11
- package/report.html +2 -2
- package/tsparticles.bundle.js +3123 -1171
- package/tsparticles.bundle.min.js +2 -2
- package/tsparticles.js +54 -80
- package/tsparticles.min.js +2 -2
- package/939.js +0 -1780
package/tsparticles.js
CHANGED
|
@@ -4,29 +4,22 @@
|
|
|
4
4
|
* Demo / Generator : https://particles.js.org/
|
|
5
5
|
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
6
|
* How to use? : Check the GitHub README
|
|
7
|
-
* v2.0
|
|
7
|
+
* v2.1.0
|
|
8
8
|
*/
|
|
9
9
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
10
10
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
11
|
-
module.exports = factory(require("tsparticles-plugin-absorbers"), require("tsparticles-plugin-emitters"), require("tsparticles-interaction-external-trail"), require("tsparticles-plugin-polygon-mask"), require("tsparticles-updater-roll"), require("tsparticles-slim"), require("tsparticles-updater-tilt"), require("tsparticles-
|
|
11
|
+
module.exports = factory(require("tsparticles-plugin-absorbers"), require("tsparticles-plugin-emitters"), require("tsparticles-interaction-external-trail"), require("tsparticles-plugin-polygon-mask"), require("tsparticles-updater-roll"), require("tsparticles-slim"), require("tsparticles-updater-tilt"), require("tsparticles-updater-twinkle"), require("tsparticles-updater-wobble"));
|
|
12
12
|
else if(typeof define === 'function' && define.amd)
|
|
13
|
-
define(["tsparticles-plugin-absorbers", "tsparticles-plugin-emitters", "tsparticles-interaction-external-trail", "tsparticles-plugin-polygon-mask", "tsparticles-updater-roll", "tsparticles-slim", "tsparticles-updater-tilt", "tsparticles-
|
|
13
|
+
define(["tsparticles-plugin-absorbers", "tsparticles-plugin-emitters", "tsparticles-interaction-external-trail", "tsparticles-plugin-polygon-mask", "tsparticles-updater-roll", "tsparticles-slim", "tsparticles-updater-tilt", "tsparticles-updater-twinkle", "tsparticles-updater-wobble"], factory);
|
|
14
14
|
else {
|
|
15
|
-
var a = typeof exports === 'object' ? factory(require("tsparticles-plugin-absorbers"), require("tsparticles-plugin-emitters"), require("tsparticles-interaction-external-trail"), require("tsparticles-plugin-polygon-mask"), require("tsparticles-updater-roll"), require("tsparticles-slim"), require("tsparticles-updater-tilt"), require("tsparticles-
|
|
15
|
+
var a = typeof exports === 'object' ? factory(require("tsparticles-plugin-absorbers"), require("tsparticles-plugin-emitters"), require("tsparticles-interaction-external-trail"), require("tsparticles-plugin-polygon-mask"), require("tsparticles-updater-roll"), require("tsparticles-slim"), require("tsparticles-updater-tilt"), require("tsparticles-updater-twinkle"), require("tsparticles-updater-wobble")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]);
|
|
16
16
|
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
17
17
|
}
|
|
18
|
-
})(this, (__WEBPACK_EXTERNAL_MODULE__502__, __WEBPACK_EXTERNAL_MODULE__949__, __WEBPACK_EXTERNAL_MODULE__165__, __WEBPACK_EXTERNAL_MODULE__742__, __WEBPACK_EXTERNAL_MODULE__281__, __WEBPACK_EXTERNAL_MODULE__208__, __WEBPACK_EXTERNAL_MODULE__950__,
|
|
18
|
+
})(this, (__WEBPACK_EXTERNAL_MODULE__502__, __WEBPACK_EXTERNAL_MODULE__949__, __WEBPACK_EXTERNAL_MODULE__165__, __WEBPACK_EXTERNAL_MODULE__742__, __WEBPACK_EXTERNAL_MODULE__281__, __WEBPACK_EXTERNAL_MODULE__208__, __WEBPACK_EXTERNAL_MODULE__950__, __WEBPACK_EXTERNAL_MODULE__30__, __WEBPACK_EXTERNAL_MODULE__304__) => {
|
|
19
19
|
return /******/ (() => { // webpackBootstrap
|
|
20
20
|
/******/ "use strict";
|
|
21
21
|
/******/ var __webpack_modules__ = ({
|
|
22
22
|
|
|
23
|
-
/***/ 818:
|
|
24
|
-
/***/ ((module) => {
|
|
25
|
-
|
|
26
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__818__;
|
|
27
|
-
|
|
28
|
-
/***/ }),
|
|
29
|
-
|
|
30
23
|
/***/ 165:
|
|
31
24
|
/***/ ((module) => {
|
|
32
25
|
|
|
@@ -76,6 +69,13 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__950__;
|
|
|
76
69
|
|
|
77
70
|
/***/ }),
|
|
78
71
|
|
|
72
|
+
/***/ 30:
|
|
73
|
+
/***/ ((module) => {
|
|
74
|
+
|
|
75
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__30__;
|
|
76
|
+
|
|
77
|
+
/***/ }),
|
|
78
|
+
|
|
79
79
|
/***/ 304:
|
|
80
80
|
/***/ ((module) => {
|
|
81
81
|
|
|
@@ -110,6 +110,18 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__304__;
|
|
|
110
110
|
/******/ }
|
|
111
111
|
/******/
|
|
112
112
|
/************************************************************************/
|
|
113
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
114
|
+
/******/ (() => {
|
|
115
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
116
|
+
/******/ __webpack_require__.n = (module) => {
|
|
117
|
+
/******/ var getter = module && module.__esModule ?
|
|
118
|
+
/******/ () => (module['default']) :
|
|
119
|
+
/******/ () => (module);
|
|
120
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
121
|
+
/******/ return getter;
|
|
122
|
+
/******/ };
|
|
123
|
+
/******/ })();
|
|
124
|
+
/******/
|
|
113
125
|
/******/ /* webpack/runtime/define property getters */
|
|
114
126
|
/******/ (() => {
|
|
115
127
|
/******/ // define getter functions for harmony exports
|
|
@@ -142,66 +154,28 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__304__;
|
|
|
142
154
|
var __webpack_exports__ = {};
|
|
143
155
|
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
144
156
|
(() => {
|
|
145
|
-
// ESM COMPAT FLAG
|
|
146
157
|
__webpack_require__.r(__webpack_exports__);
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
var
|
|
155
|
-
|
|
156
|
-
var
|
|
157
|
-
|
|
158
|
-
var
|
|
159
|
-
|
|
160
|
-
var
|
|
161
|
-
|
|
162
|
-
var
|
|
163
|
-
|
|
164
|
-
var
|
|
165
|
-
|
|
166
|
-
var
|
|
167
|
-
|
|
168
|
-
var external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_ = __webpack_require__(818);
|
|
169
|
-
;// CONCATENATED MODULE: ../../updaters/twinkle/dist/esm/TwinkleUpdater.js
|
|
170
|
-
|
|
171
|
-
class TwinkleUpdater {
|
|
172
|
-
getColorStyles(particle, context, radius, opacity) {
|
|
173
|
-
const pOptions = particle.options,
|
|
174
|
-
twinkle = pOptions.twinkle.particles,
|
|
175
|
-
twinkling = twinkle.enable && Math.random() < twinkle.frequency,
|
|
176
|
-
zIndexOptions = particle.options.zIndex,
|
|
177
|
-
zOpacityFactor = (1 - particle.zIndexFactor) ** zIndexOptions.opacityRate,
|
|
178
|
-
twinklingOpacity = twinkling ? (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.getRangeValue)(twinkle.opacity) * zOpacityFactor : opacity,
|
|
179
|
-
twinkleRgb = (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.colorToHsl)(twinkle.color),
|
|
180
|
-
twinkleStyle = twinkleRgb ? (0,external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.getStyleFromHsl)(twinkleRgb, twinklingOpacity) : undefined,
|
|
181
|
-
res = {},
|
|
182
|
-
needsTwinkle = twinkling && twinkleStyle;
|
|
183
|
-
res.fill = needsTwinkle ? twinkleStyle : undefined;
|
|
184
|
-
res.stroke = needsTwinkle ? twinkleStyle : undefined;
|
|
185
|
-
return res;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
init() {}
|
|
189
|
-
|
|
190
|
-
isEnabled(particle) {
|
|
191
|
-
return particle.options.twinkle.particles.enable;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
update() {}
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
;// CONCATENATED MODULE: ../../updaters/twinkle/dist/esm/index.js
|
|
198
|
-
|
|
199
|
-
async function loadTwinkleUpdater(engine) {
|
|
200
|
-
await engine.addParticleUpdater("twinkle", () => new TwinkleUpdater());
|
|
201
|
-
}
|
|
202
|
-
// EXTERNAL MODULE: external {"commonjs":"tsparticles-updater-wobble","commonjs2":"tsparticles-updater-wobble","amd":"tsparticles-updater-wobble","root":"window"}
|
|
203
|
-
var external_commonjs_tsparticles_updater_wobble_commonjs2_tsparticles_updater_wobble_amd_tsparticles_updater_wobble_root_window_ = __webpack_require__(304);
|
|
204
|
-
;// CONCATENATED MODULE: ./dist/browser/index.js
|
|
158
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
159
|
+
/* harmony export */ "loadFull": () => (/* binding */ loadFull)
|
|
160
|
+
/* harmony export */ });
|
|
161
|
+
/* harmony import */ var tsparticles_plugin_absorbers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(502);
|
|
162
|
+
/* harmony import */ var tsparticles_plugin_absorbers__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(tsparticles_plugin_absorbers__WEBPACK_IMPORTED_MODULE_0__);
|
|
163
|
+
/* harmony import */ var tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(949);
|
|
164
|
+
/* harmony import */ var tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_1__);
|
|
165
|
+
/* harmony import */ var tsparticles_interaction_external_trail__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(165);
|
|
166
|
+
/* harmony import */ var tsparticles_interaction_external_trail__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(tsparticles_interaction_external_trail__WEBPACK_IMPORTED_MODULE_2__);
|
|
167
|
+
/* harmony import */ var tsparticles_plugin_polygon_mask__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(742);
|
|
168
|
+
/* harmony import */ var tsparticles_plugin_polygon_mask__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(tsparticles_plugin_polygon_mask__WEBPACK_IMPORTED_MODULE_3__);
|
|
169
|
+
/* harmony import */ var tsparticles_updater_roll__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(281);
|
|
170
|
+
/* harmony import */ var tsparticles_updater_roll__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(tsparticles_updater_roll__WEBPACK_IMPORTED_MODULE_4__);
|
|
171
|
+
/* harmony import */ var tsparticles_slim__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(208);
|
|
172
|
+
/* harmony import */ var tsparticles_slim__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(tsparticles_slim__WEBPACK_IMPORTED_MODULE_5__);
|
|
173
|
+
/* harmony import */ var tsparticles_updater_tilt__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(950);
|
|
174
|
+
/* harmony import */ var tsparticles_updater_tilt__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(tsparticles_updater_tilt__WEBPACK_IMPORTED_MODULE_6__);
|
|
175
|
+
/* harmony import */ var tsparticles_updater_twinkle__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(30);
|
|
176
|
+
/* harmony import */ var tsparticles_updater_twinkle__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(tsparticles_updater_twinkle__WEBPACK_IMPORTED_MODULE_7__);
|
|
177
|
+
/* harmony import */ var tsparticles_updater_wobble__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(304);
|
|
178
|
+
/* harmony import */ var tsparticles_updater_wobble__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(tsparticles_updater_wobble__WEBPACK_IMPORTED_MODULE_8__);
|
|
205
179
|
|
|
206
180
|
|
|
207
181
|
|
|
@@ -212,15 +186,15 @@ var external_commonjs_tsparticles_updater_wobble_commonjs2_tsparticles_updater_w
|
|
|
212
186
|
|
|
213
187
|
|
|
214
188
|
async function loadFull(engine) {
|
|
215
|
-
await (0,
|
|
216
|
-
await (0,
|
|
217
|
-
await (0,
|
|
218
|
-
await loadTwinkleUpdater(engine);
|
|
219
|
-
await (0,
|
|
220
|
-
await (0,
|
|
221
|
-
await (0,
|
|
222
|
-
await (0,
|
|
223
|
-
await (0,
|
|
189
|
+
await (0,tsparticles_slim__WEBPACK_IMPORTED_MODULE_5__.loadSlim)(engine);
|
|
190
|
+
await (0,tsparticles_updater_roll__WEBPACK_IMPORTED_MODULE_4__.loadRollUpdater)(engine);
|
|
191
|
+
await (0,tsparticles_updater_tilt__WEBPACK_IMPORTED_MODULE_6__.loadTiltUpdater)(engine);
|
|
192
|
+
await (0,tsparticles_updater_twinkle__WEBPACK_IMPORTED_MODULE_7__.loadTwinkleUpdater)(engine);
|
|
193
|
+
await (0,tsparticles_updater_wobble__WEBPACK_IMPORTED_MODULE_8__.loadWobbleUpdater)(engine);
|
|
194
|
+
await (0,tsparticles_interaction_external_trail__WEBPACK_IMPORTED_MODULE_2__.loadExternalTrailInteraction)(engine);
|
|
195
|
+
await (0,tsparticles_plugin_absorbers__WEBPACK_IMPORTED_MODULE_0__.loadAbsorbersPlugin)(engine);
|
|
196
|
+
await (0,tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_1__.loadEmittersPlugin)(engine);
|
|
197
|
+
await (0,tsparticles_plugin_polygon_mask__WEBPACK_IMPORTED_MODULE_3__.loadPolygonMaskPlugin)(engine);
|
|
224
198
|
}
|
|
225
199
|
})();
|
|
226
200
|
|
package/tsparticles.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v2.0
|
|
2
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("tsparticles-plugin-absorbers"),require("tsparticles-plugin-emitters"),require("tsparticles-interaction-external-trail"),require("tsparticles-plugin-polygon-mask"),require("tsparticles-updater-roll"),require("tsparticles-slim"),require("tsparticles-updater-tilt"),require("tsparticles-
|
|
1
|
+
/*! tsParticles v2.1.0 by Matteo Bruni */
|
|
2
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("tsparticles-plugin-absorbers"),require("tsparticles-plugin-emitters"),require("tsparticles-interaction-external-trail"),require("tsparticles-plugin-polygon-mask"),require("tsparticles-updater-roll"),require("tsparticles-slim"),require("tsparticles-updater-tilt"),require("tsparticles-updater-twinkle"),require("tsparticles-updater-wobble"));else if("function"==typeof define&&define.amd)define(["tsparticles-plugin-absorbers","tsparticles-plugin-emitters","tsparticles-interaction-external-trail","tsparticles-plugin-polygon-mask","tsparticles-updater-roll","tsparticles-slim","tsparticles-updater-tilt","tsparticles-updater-twinkle","tsparticles-updater-wobble"],t);else{var r="object"==typeof exports?t(require("tsparticles-plugin-absorbers"),require("tsparticles-plugin-emitters"),require("tsparticles-interaction-external-trail"),require("tsparticles-plugin-polygon-mask"),require("tsparticles-updater-roll"),require("tsparticles-slim"),require("tsparticles-updater-tilt"),require("tsparticles-updater-twinkle"),require("tsparticles-updater-wobble")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var i in r)("object"==typeof exports?exports:e)[i]=r[i]}}(this,((e,t,r,i,a,l,s,o,p)=>(()=>{"use strict";var n={165:e=>{e.exports=r},502:t=>{t.exports=e},949:e=>{e.exports=t},742:e=>{e.exports=i},208:e=>{e.exports=l},281:e=>{e.exports=a},950:e=>{e.exports=s},30:e=>{e.exports=o},304:e=>{e.exports=p}},u={};function d(e){var t=u[e];if(void 0!==t)return t.exports;var r=u[e]={exports:{}};return n[e](r,r.exports,d),r.exports}d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},d.d=(e,t)=>{for(var r in t)d.o(t,r)&&!d.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{d.r(c),d.d(c,{loadFull:()=>n});var e=d(502),t=d(949),r=d(165),i=d(742),a=d(281),l=d(208),s=d(950),o=d(30),p=d(304);async function n(n){await(0,l.loadSlim)(n),await(0,a.loadRollUpdater)(n),await(0,s.loadTiltUpdater)(n),await(0,o.loadTwinkleUpdater)(n),await(0,p.loadWobbleUpdater)(n),await(0,r.loadExternalTrailInteraction)(n),await(0,e.loadAbsorbersPlugin)(n),await(0,t.loadEmittersPlugin)(n),await(0,i.loadPolygonMaskPlugin)(n)}})(),c})()));
|