@tsparticles/updater-roll 3.9.1 → 4.0.0-alpha.1
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/386.min.js +2 -0
- package/386.min.js.LICENSE.txt +1 -0
- package/browser/RollUpdater.js +1 -3
- package/browser/index.js +8 -6
- package/cjs/Options/Classes/Roll.js +10 -14
- package/cjs/Options/Classes/RollLight.js +4 -8
- package/cjs/Options/Interfaces/IRoll.js +1 -2
- package/cjs/Options/Interfaces/IRollLight.js +1 -2
- package/cjs/RollMode.js +2 -5
- package/cjs/RollUpdater.js +6 -12
- package/cjs/Types.js +1 -2
- package/cjs/Utils.js +15 -19
- package/cjs/index.js +8 -9
- package/dist_browser_RollUpdater_js.js +70 -0
- package/esm/RollUpdater.js +1 -3
- package/esm/index.js +8 -6
- package/package.json +4 -3
- package/report.html +5 -4
- package/tsparticles.updater.roll.js +209 -70
- package/tsparticles.updater.roll.min.js +1 -1
- package/tsparticles.updater.roll.min.js.LICENSE.txt +1 -1
- package/types/index.d.ts +1 -1
- package/umd/RollUpdater.js +1 -3
- package/umd/index.js +43 -7
|
@@ -4,7 +4,7 @@
|
|
|
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
|
-
*
|
|
7
|
+
* v4.0.0-alpha.1
|
|
8
8
|
*/
|
|
9
9
|
/*
|
|
10
10
|
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
@@ -28,75 +28,25 @@ return /******/ (() => { // webpackBootstrap
|
|
|
28
28
|
/******/ "use strict";
|
|
29
29
|
/******/ var __webpack_modules__ = ({
|
|
30
30
|
|
|
31
|
-
/***/ "./dist/browser/
|
|
32
|
-
/*!**********************************************!*\
|
|
33
|
-
!*** ./dist/browser/Options/Classes/Roll.js ***!
|
|
34
|
-
\**********************************************/
|
|
35
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
36
|
-
|
|
37
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Roll: () => (/* binding */ Roll)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _RollLight_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RollLight.js */ \"./dist/browser/Options/Classes/RollLight.js\");\n/* harmony import */ var _RollMode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../RollMode.js */ \"./dist/browser/RollMode.js\");\n\n\n\nclass Roll {\n constructor() {\n this.darken = new _RollLight_js__WEBPACK_IMPORTED_MODULE_1__.RollLight();\n this.enable = false;\n this.enlighten = new _RollLight_js__WEBPACK_IMPORTED_MODULE_1__.RollLight();\n this.mode = _RollMode_js__WEBPACK_IMPORTED_MODULE_2__.RollMode.vertical;\n this.speed = 25;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.backColor !== undefined) {\n this.backColor = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OptionsColor.create(this.backColor, data.backColor);\n }\n this.darken.load(data.darken);\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n this.enlighten.load(data.enlighten);\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n if (data.speed !== undefined) {\n this.speed = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.speed);\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/updater-roll/./dist/browser/Options/Classes/Roll.js?\n}");
|
|
38
|
-
|
|
39
|
-
/***/ }),
|
|
40
|
-
|
|
41
|
-
/***/ "./dist/browser/Options/Classes/RollLight.js":
|
|
42
|
-
/*!***************************************************!*\
|
|
43
|
-
!*** ./dist/browser/Options/Classes/RollLight.js ***!
|
|
44
|
-
\***************************************************/
|
|
45
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
46
|
-
|
|
47
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RollLight: () => (/* binding */ RollLight)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nclass RollLight {\n constructor() {\n this.enable = false;\n this.value = 0;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.value !== undefined) {\n this.value = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.value);\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/updater-roll/./dist/browser/Options/Classes/RollLight.js?\n}");
|
|
48
|
-
|
|
49
|
-
/***/ }),
|
|
50
|
-
|
|
51
|
-
/***/ "./dist/browser/RollMode.js":
|
|
52
|
-
/*!**********************************!*\
|
|
53
|
-
!*** ./dist/browser/RollMode.js ***!
|
|
54
|
-
\**********************************/
|
|
55
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
56
|
-
|
|
57
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RollMode: () => (/* binding */ RollMode)\n/* harmony export */ });\nvar RollMode;\n(function (RollMode) {\n RollMode[\"both\"] = \"both\";\n RollMode[\"horizontal\"] = \"horizontal\";\n RollMode[\"vertical\"] = \"vertical\";\n})(RollMode || (RollMode = {}));\n\n//# sourceURL=webpack://@tsparticles/updater-roll/./dist/browser/RollMode.js?\n}");
|
|
58
|
-
|
|
59
|
-
/***/ }),
|
|
60
|
-
|
|
61
|
-
/***/ "./dist/browser/RollUpdater.js":
|
|
62
|
-
/*!*************************************!*\
|
|
63
|
-
!*** ./dist/browser/RollUpdater.js ***!
|
|
64
|
-
\*************************************/
|
|
65
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
66
|
-
|
|
67
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RollUpdater: () => (/* binding */ RollUpdater)\n/* harmony export */ });\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Utils.js */ \"./dist/browser/Utils.js\");\n/* harmony import */ var _Options_Classes_Roll_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Options/Classes/Roll.js */ \"./dist/browser/Options/Classes/Roll.js\");\n\n\nclass RollUpdater {\n constructor(engine) {\n this._engine = engine;\n }\n getTransformValues(particle) {\n const roll = particle.roll?.enable && particle.roll,\n rollHorizontal = roll && roll.horizontal,\n rollVertical = roll && roll.vertical;\n return {\n a: rollHorizontal ? Math.cos(roll.angle) : undefined,\n d: rollVertical ? Math.sin(roll.angle) : undefined\n };\n }\n init(particle) {\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_0__.initParticle)(this._engine, particle);\n }\n isEnabled(particle) {\n const roll = particle.options.roll;\n return !particle.destroyed && !particle.spawning && !!roll?.enable;\n }\n loadOptions(options, ...sources) {\n if (!options.roll) {\n options.roll = new _Options_Classes_Roll_js__WEBPACK_IMPORTED_MODULE_1__.Roll();\n }\n for (const source of sources) {\n options.roll.load(source?.roll);\n }\n }\n update(particle, delta) {\n if (!this.isEnabled(particle)) {\n return;\n }\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_0__.updateRoll)(particle, delta);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/updater-roll/./dist/browser/RollUpdater.js?\n}");
|
|
68
|
-
|
|
69
|
-
/***/ }),
|
|
70
|
-
|
|
71
|
-
/***/ "./dist/browser/Utils.js":
|
|
72
|
-
/*!*******************************!*\
|
|
73
|
-
!*** ./dist/browser/Utils.js ***!
|
|
74
|
-
\*******************************/
|
|
75
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
76
|
-
|
|
77
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ initParticle: () => (/* binding */ initParticle),\n/* harmony export */ updateRoll: () => (/* binding */ updateRoll)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _RollMode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RollMode.js */ \"./dist/browser/RollMode.js\");\n\n\nconst double = 2,\n doublePI = Math.PI * double,\n maxAngle = 360;\nfunction initParticle(engine, particle) {\n const rollOpt = particle.options.roll;\n if (!rollOpt?.enable) {\n particle.roll = {\n enable: false,\n horizontal: false,\n vertical: false,\n angle: 0,\n speed: 0\n };\n return;\n }\n particle.roll = {\n enable: rollOpt.enable,\n horizontal: rollOpt.mode === _RollMode_js__WEBPACK_IMPORTED_MODULE_1__.RollMode.horizontal || rollOpt.mode === _RollMode_js__WEBPACK_IMPORTED_MODULE_1__.RollMode.both,\n vertical: rollOpt.mode === _RollMode_js__WEBPACK_IMPORTED_MODULE_1__.RollMode.vertical || rollOpt.mode === _RollMode_js__WEBPACK_IMPORTED_MODULE_1__.RollMode.both,\n angle: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * doublePI,\n speed: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(rollOpt.speed) / maxAngle\n };\n if (rollOpt.backColor) {\n particle.backColor = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.rangeColorToHsl)(engine, rollOpt.backColor);\n } else if (rollOpt.darken.enable && rollOpt.enlighten.enable) {\n const alterType = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() >= _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.half ? _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AlterType.darken : _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AlterType.enlighten;\n particle.roll.alter = {\n type: alterType,\n value: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(alterType === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AlterType.darken ? rollOpt.darken.value : rollOpt.enlighten.value)\n };\n } else if (rollOpt.darken.enable) {\n particle.roll.alter = {\n type: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AlterType.darken,\n value: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(rollOpt.darken.value)\n };\n } else if (rollOpt.enlighten.enable) {\n particle.roll.alter = {\n type: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AlterType.enlighten,\n value: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(rollOpt.enlighten.value)\n };\n }\n}\nfunction updateRoll(particle, delta) {\n const roll = particle.options.roll,\n data = particle.roll;\n if (!data || !roll?.enable) {\n return;\n }\n const speed = data.speed * delta.factor,\n max = doublePI;\n data.angle += speed;\n if (data.angle > max) {\n data.angle -= max;\n }\n}\n\n//# sourceURL=webpack://@tsparticles/updater-roll/./dist/browser/Utils.js?\n}");
|
|
78
|
-
|
|
79
|
-
/***/ }),
|
|
80
|
-
|
|
81
|
-
/***/ "./dist/browser/index.js":
|
|
31
|
+
/***/ "./dist/browser/index.js"
|
|
82
32
|
/*!*******************************!*\
|
|
83
33
|
!*** ./dist/browser/index.js ***!
|
|
84
34
|
\*******************************/
|
|
85
|
-
|
|
35
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
86
36
|
|
|
87
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadRollUpdater: () => (/* binding */ loadRollUpdater)\n/* harmony export */ });\
|
|
37
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadRollUpdater: () => (/* binding */ loadRollUpdater)\n/* harmony export */ });\nfunction loadRollUpdater(engine) {\n engine.checkVersion(\"4.0.0-alpha.1\");\n engine.register(e => {\n e.addParticleUpdater(\"roll\", async () => {\n const {\n RollUpdater\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_RollUpdater_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./RollUpdater.js */ \"./dist/browser/RollUpdater.js\"));\n return new RollUpdater(e);\n });\n });\n}\n\n//# sourceURL=webpack://@tsparticles/updater-roll/./dist/browser/index.js?\n}");
|
|
88
38
|
|
|
89
|
-
/***/ }
|
|
39
|
+
/***/ },
|
|
90
40
|
|
|
91
|
-
/***/ "@tsparticles/engine"
|
|
41
|
+
/***/ "@tsparticles/engine"
|
|
92
42
|
/*!*********************************************************************************************************************************!*\
|
|
93
43
|
!*** external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"} ***!
|
|
94
44
|
\*********************************************************************************************************************************/
|
|
95
|
-
|
|
45
|
+
(module) {
|
|
96
46
|
|
|
97
47
|
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
98
48
|
|
|
99
|
-
/***/ }
|
|
49
|
+
/***/ }
|
|
100
50
|
|
|
101
51
|
/******/ });
|
|
102
52
|
/************************************************************************/
|
|
@@ -110,6 +60,12 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
|
110
60
|
/******/ if (cachedModule !== undefined) {
|
|
111
61
|
/******/ return cachedModule.exports;
|
|
112
62
|
/******/ }
|
|
63
|
+
/******/ // Check if module exists (development only)
|
|
64
|
+
/******/ if (__webpack_modules__[moduleId] === undefined) {
|
|
65
|
+
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
66
|
+
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
67
|
+
/******/ throw e;
|
|
68
|
+
/******/ }
|
|
113
69
|
/******/ // Create a new module (and put it into the cache)
|
|
114
70
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
115
71
|
/******/ // no module.id needed
|
|
@@ -124,19 +80,10 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
|
124
80
|
/******/ return module.exports;
|
|
125
81
|
/******/ }
|
|
126
82
|
/******/
|
|
127
|
-
|
|
128
|
-
/******/
|
|
129
|
-
/******/ (() => {
|
|
130
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
131
|
-
/******/ __webpack_require__.n = (module) => {
|
|
132
|
-
/******/ var getter = module && module.__esModule ?
|
|
133
|
-
/******/ () => (module['default']) :
|
|
134
|
-
/******/ () => (module);
|
|
135
|
-
/******/ __webpack_require__.d(getter, { a: getter });
|
|
136
|
-
/******/ return getter;
|
|
137
|
-
/******/ };
|
|
138
|
-
/******/ })();
|
|
83
|
+
/******/ // expose the modules object (__webpack_modules__)
|
|
84
|
+
/******/ __webpack_require__.m = __webpack_modules__;
|
|
139
85
|
/******/
|
|
86
|
+
/************************************************************************/
|
|
140
87
|
/******/ /* webpack/runtime/define property getters */
|
|
141
88
|
/******/ (() => {
|
|
142
89
|
/******/ // define getter functions for harmony exports
|
|
@@ -149,11 +96,90 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
|
149
96
|
/******/ };
|
|
150
97
|
/******/ })();
|
|
151
98
|
/******/
|
|
99
|
+
/******/ /* webpack/runtime/ensure chunk */
|
|
100
|
+
/******/ (() => {
|
|
101
|
+
/******/ __webpack_require__.f = {};
|
|
102
|
+
/******/ // This file contains only the entry chunk.
|
|
103
|
+
/******/ // The chunk loading function for additional chunks
|
|
104
|
+
/******/ __webpack_require__.e = (chunkId) => {
|
|
105
|
+
/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {
|
|
106
|
+
/******/ __webpack_require__.f[key](chunkId, promises);
|
|
107
|
+
/******/ return promises;
|
|
108
|
+
/******/ }, []));
|
|
109
|
+
/******/ };
|
|
110
|
+
/******/ })();
|
|
111
|
+
/******/
|
|
112
|
+
/******/ /* webpack/runtime/get javascript chunk filename */
|
|
113
|
+
/******/ (() => {
|
|
114
|
+
/******/ // This function allow to reference async chunks
|
|
115
|
+
/******/ __webpack_require__.u = (chunkId) => {
|
|
116
|
+
/******/ // return url for filenames based on template
|
|
117
|
+
/******/ return "" + chunkId + ".js";
|
|
118
|
+
/******/ };
|
|
119
|
+
/******/ })();
|
|
120
|
+
/******/
|
|
121
|
+
/******/ /* webpack/runtime/global */
|
|
122
|
+
/******/ (() => {
|
|
123
|
+
/******/ __webpack_require__.g = (function() {
|
|
124
|
+
/******/ if (typeof globalThis === 'object') return globalThis;
|
|
125
|
+
/******/ try {
|
|
126
|
+
/******/ return this || new Function('return this')();
|
|
127
|
+
/******/ } catch (e) {
|
|
128
|
+
/******/ if (typeof window === 'object') return window;
|
|
129
|
+
/******/ }
|
|
130
|
+
/******/ })();
|
|
131
|
+
/******/ })();
|
|
132
|
+
/******/
|
|
152
133
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
153
134
|
/******/ (() => {
|
|
154
135
|
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
155
136
|
/******/ })();
|
|
156
137
|
/******/
|
|
138
|
+
/******/ /* webpack/runtime/load script */
|
|
139
|
+
/******/ (() => {
|
|
140
|
+
/******/ var inProgress = {};
|
|
141
|
+
/******/ var dataWebpackPrefix = "@tsparticles/updater-roll:";
|
|
142
|
+
/******/ // loadScript function to load a script via script tag
|
|
143
|
+
/******/ __webpack_require__.l = (url, done, key, chunkId) => {
|
|
144
|
+
/******/ if(inProgress[url]) { inProgress[url].push(done); return; }
|
|
145
|
+
/******/ var script, needAttach;
|
|
146
|
+
/******/ if(key !== undefined) {
|
|
147
|
+
/******/ var scripts = document.getElementsByTagName("script");
|
|
148
|
+
/******/ for(var i = 0; i < scripts.length; i++) {
|
|
149
|
+
/******/ var s = scripts[i];
|
|
150
|
+
/******/ if(s.getAttribute("src") == url || s.getAttribute("data-webpack") == dataWebpackPrefix + key) { script = s; break; }
|
|
151
|
+
/******/ }
|
|
152
|
+
/******/ }
|
|
153
|
+
/******/ if(!script) {
|
|
154
|
+
/******/ needAttach = true;
|
|
155
|
+
/******/ script = document.createElement('script');
|
|
156
|
+
/******/
|
|
157
|
+
/******/ script.charset = 'utf-8';
|
|
158
|
+
/******/ if (__webpack_require__.nc) {
|
|
159
|
+
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
|
160
|
+
/******/ }
|
|
161
|
+
/******/ script.setAttribute("data-webpack", dataWebpackPrefix + key);
|
|
162
|
+
/******/
|
|
163
|
+
/******/ script.src = url;
|
|
164
|
+
/******/ }
|
|
165
|
+
/******/ inProgress[url] = [done];
|
|
166
|
+
/******/ var onScriptComplete = (prev, event) => {
|
|
167
|
+
/******/ // avoid mem leaks in IE.
|
|
168
|
+
/******/ script.onerror = script.onload = null;
|
|
169
|
+
/******/ clearTimeout(timeout);
|
|
170
|
+
/******/ var doneFns = inProgress[url];
|
|
171
|
+
/******/ delete inProgress[url];
|
|
172
|
+
/******/ script.parentNode && script.parentNode.removeChild(script);
|
|
173
|
+
/******/ doneFns && doneFns.forEach((fn) => (fn(event)));
|
|
174
|
+
/******/ if(prev) return prev(event);
|
|
175
|
+
/******/ }
|
|
176
|
+
/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
|
|
177
|
+
/******/ script.onerror = onScriptComplete.bind(null, script.onerror);
|
|
178
|
+
/******/ script.onload = onScriptComplete.bind(null, script.onload);
|
|
179
|
+
/******/ needAttach && document.head.appendChild(script);
|
|
180
|
+
/******/ };
|
|
181
|
+
/******/ })();
|
|
182
|
+
/******/
|
|
157
183
|
/******/ /* webpack/runtime/make namespace object */
|
|
158
184
|
/******/ (() => {
|
|
159
185
|
/******/ // define __esModule on exports
|
|
@@ -165,6 +191,119 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
|
165
191
|
/******/ };
|
|
166
192
|
/******/ })();
|
|
167
193
|
/******/
|
|
194
|
+
/******/ /* webpack/runtime/publicPath */
|
|
195
|
+
/******/ (() => {
|
|
196
|
+
/******/ var scriptUrl;
|
|
197
|
+
/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
|
|
198
|
+
/******/ var document = __webpack_require__.g.document;
|
|
199
|
+
/******/ if (!scriptUrl && document) {
|
|
200
|
+
/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')
|
|
201
|
+
/******/ scriptUrl = document.currentScript.src;
|
|
202
|
+
/******/ if (!scriptUrl) {
|
|
203
|
+
/******/ var scripts = document.getElementsByTagName("script");
|
|
204
|
+
/******/ if(scripts.length) {
|
|
205
|
+
/******/ var i = scripts.length - 1;
|
|
206
|
+
/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;
|
|
207
|
+
/******/ }
|
|
208
|
+
/******/ }
|
|
209
|
+
/******/ }
|
|
210
|
+
/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration
|
|
211
|
+
/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.
|
|
212
|
+
/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
|
|
213
|
+
/******/ scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
|
|
214
|
+
/******/ __webpack_require__.p = scriptUrl;
|
|
215
|
+
/******/ })();
|
|
216
|
+
/******/
|
|
217
|
+
/******/ /* webpack/runtime/jsonp chunk loading */
|
|
218
|
+
/******/ (() => {
|
|
219
|
+
/******/ // no baseURI
|
|
220
|
+
/******/
|
|
221
|
+
/******/ // object to store loaded and loading chunks
|
|
222
|
+
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
|
223
|
+
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
|
224
|
+
/******/ var installedChunks = {
|
|
225
|
+
/******/ "tsparticles.updater.roll": 0
|
|
226
|
+
/******/ };
|
|
227
|
+
/******/
|
|
228
|
+
/******/ __webpack_require__.f.j = (chunkId, promises) => {
|
|
229
|
+
/******/ // JSONP chunk loading for javascript
|
|
230
|
+
/******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;
|
|
231
|
+
/******/ if(installedChunkData !== 0) { // 0 means "already installed".
|
|
232
|
+
/******/
|
|
233
|
+
/******/ // a Promise means "currently loading".
|
|
234
|
+
/******/ if(installedChunkData) {
|
|
235
|
+
/******/ promises.push(installedChunkData[2]);
|
|
236
|
+
/******/ } else {
|
|
237
|
+
/******/ if(true) { // all chunks have JS
|
|
238
|
+
/******/ // setup Promise in chunk cache
|
|
239
|
+
/******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));
|
|
240
|
+
/******/ promises.push(installedChunkData[2] = promise);
|
|
241
|
+
/******/
|
|
242
|
+
/******/ // start chunk loading
|
|
243
|
+
/******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId);
|
|
244
|
+
/******/ // create error before stack unwound to get useful stacktrace later
|
|
245
|
+
/******/ var error = new Error();
|
|
246
|
+
/******/ var loadingEnded = (event) => {
|
|
247
|
+
/******/ if(__webpack_require__.o(installedChunks, chunkId)) {
|
|
248
|
+
/******/ installedChunkData = installedChunks[chunkId];
|
|
249
|
+
/******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined;
|
|
250
|
+
/******/ if(installedChunkData) {
|
|
251
|
+
/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type);
|
|
252
|
+
/******/ var realSrc = event && event.target && event.target.src;
|
|
253
|
+
/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
|
|
254
|
+
/******/ error.name = 'ChunkLoadError';
|
|
255
|
+
/******/ error.type = errorType;
|
|
256
|
+
/******/ error.request = realSrc;
|
|
257
|
+
/******/ installedChunkData[1](error);
|
|
258
|
+
/******/ }
|
|
259
|
+
/******/ }
|
|
260
|
+
/******/ };
|
|
261
|
+
/******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId);
|
|
262
|
+
/******/ }
|
|
263
|
+
/******/ }
|
|
264
|
+
/******/ }
|
|
265
|
+
/******/ };
|
|
266
|
+
/******/
|
|
267
|
+
/******/ // no prefetching
|
|
268
|
+
/******/
|
|
269
|
+
/******/ // no preloaded
|
|
270
|
+
/******/
|
|
271
|
+
/******/ // no HMR
|
|
272
|
+
/******/
|
|
273
|
+
/******/ // no HMR manifest
|
|
274
|
+
/******/
|
|
275
|
+
/******/ // no on chunks loaded
|
|
276
|
+
/******/
|
|
277
|
+
/******/ // install a JSONP callback for chunk loading
|
|
278
|
+
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
|
279
|
+
/******/ var [chunkIds, moreModules, runtime] = data;
|
|
280
|
+
/******/ // add "moreModules" to the modules object,
|
|
281
|
+
/******/ // then flag all "chunkIds" as loaded and fire callback
|
|
282
|
+
/******/ var moduleId, chunkId, i = 0;
|
|
283
|
+
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
|
284
|
+
/******/ for(moduleId in moreModules) {
|
|
285
|
+
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
|
286
|
+
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
|
287
|
+
/******/ }
|
|
288
|
+
/******/ }
|
|
289
|
+
/******/ if(runtime) var result = runtime(__webpack_require__);
|
|
290
|
+
/******/ }
|
|
291
|
+
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
|
292
|
+
/******/ for(;i < chunkIds.length; i++) {
|
|
293
|
+
/******/ chunkId = chunkIds[i];
|
|
294
|
+
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
|
295
|
+
/******/ installedChunks[chunkId][0]();
|
|
296
|
+
/******/ }
|
|
297
|
+
/******/ installedChunks[chunkId] = 0;
|
|
298
|
+
/******/ }
|
|
299
|
+
/******/
|
|
300
|
+
/******/ }
|
|
301
|
+
/******/
|
|
302
|
+
/******/ var chunkLoadingGlobal = this["webpackChunk_tsparticles_updater_roll"] = this["webpackChunk_tsparticles_updater_roll"] || [];
|
|
303
|
+
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
|
304
|
+
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
|
305
|
+
/******/ })();
|
|
306
|
+
/******/
|
|
168
307
|
/************************************************************************/
|
|
169
308
|
/******/
|
|
170
309
|
/******/ // startup
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see tsparticles.updater.roll.min.js.LICENSE.txt */
|
|
2
|
-
!function(e,
|
|
2
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],t);else{var r="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(this,(e=>(()=>{var t,r,o={303(t){t.exports=e}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}};return o[e](r,r.exports,i),r.exports}i.m=o,i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,r)=>(i.f[r](e,t),t)),[])),i.u=e=>e+".min.js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},r="@tsparticles/updater-roll:",i.l=(e,o,n,a)=>{if(t[e])t[e].push(o);else{var l,s;if(void 0!==n)for(var p=document.getElementsByTagName("script"),c=0;c<p.length;c++){var u=p[c];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==r+n){l=u;break}}l||(s=!0,(l=document.createElement("script")).charset="utf-8",i.nc&&l.setAttribute("nonce",i.nc),l.setAttribute("data-webpack",r+n),l.src=e),t[e]=[o];var d=(r,o)=>{l.onerror=l.onload=null,clearTimeout(f);var n=t[e];if(delete t[e],l.parentNode&&l.parentNode.removeChild(l),n&&n.forEach((e=>e(o))),r)return r(o)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=d.bind(null,l.onerror),l.onload=d.bind(null,l.onload),s&&document.head.appendChild(l)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={621:0};i.f.j=(t,r)=>{var o=i.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var n=new Promise(((r,n)=>o=e[t]=[r,n]));r.push(o[2]=n);var a=i.p+i.u(t),l=new Error;i.l(a,(r=>{if(i.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var n=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;l.message="Loading chunk "+t+" failed.\n("+n+": "+a+")",l.name="ChunkLoadError",l.type=n,l.request=a,o[1](l)}}),"chunk-"+t,t)}};var t=(t,r)=>{var o,n,[a,l,s]=r,p=0;if(a.some((t=>0!==e[t]))){for(o in l)i.o(l,o)&&(i.m[o]=l[o]);if(s)s(i)}for(t&&t(r);p<a.length;p++)n=a[p],i.o(e,n)&&e[n]&&e[n][0](),e[n]=0},r=this.webpackChunk_tsparticles_updater_roll=this.webpackChunk_tsparticles_updater_roll||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a={};function l(e){e.checkVersion("4.0.0-alpha.1"),e.register((e=>{e.addParticleUpdater("roll",(async()=>{const{RollUpdater:t}=await i.e(386).then(i.bind(i,386));return new t(e)}))}))}return i.r(a),i.d(a,{loadRollUpdater:()=>l}),a})()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tsParticles Roll Updater
|
|
1
|
+
/*! tsParticles Roll Updater v4.0.0-alpha.1 by Matteo Bruni */
|
package/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type Engine } from "@tsparticles/engine";
|
|
2
|
-
export declare function loadRollUpdater(engine: Engine
|
|
2
|
+
export declare function loadRollUpdater(engine: Engine): void;
|
package/umd/RollUpdater.js
CHANGED
|
@@ -31,9 +31,7 @@
|
|
|
31
31
|
return !particle.destroyed && !particle.spawning && !!roll?.enable;
|
|
32
32
|
}
|
|
33
33
|
loadOptions(options, ...sources) {
|
|
34
|
-
|
|
35
|
-
options.roll = new Roll_js_1.Roll();
|
|
36
|
-
}
|
|
34
|
+
options.roll ??= new Roll_js_1.Roll();
|
|
37
35
|
for (const source of sources) {
|
|
38
36
|
options.roll.load(source?.roll);
|
|
39
37
|
}
|
package/umd/index.js
CHANGED
|
@@ -1,20 +1,56 @@
|
|
|
1
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
+
if (k2 === undefined) k2 = k;
|
|
3
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(o, k2, desc);
|
|
8
|
+
}) : (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
o[k2] = m[k];
|
|
11
|
+
}));
|
|
12
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
13
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
14
|
+
}) : function(o, v) {
|
|
15
|
+
o["default"] = v;
|
|
16
|
+
});
|
|
17
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
18
|
+
var ownKeys = function(o) {
|
|
19
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
20
|
+
var ar = [];
|
|
21
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
22
|
+
return ar;
|
|
23
|
+
};
|
|
24
|
+
return ownKeys(o);
|
|
25
|
+
};
|
|
26
|
+
return function (mod) {
|
|
27
|
+
if (mod && mod.__esModule) return mod;
|
|
28
|
+
var result = {};
|
|
29
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
30
|
+
__setModuleDefault(result, mod);
|
|
31
|
+
return result;
|
|
32
|
+
};
|
|
33
|
+
})();
|
|
1
34
|
(function (factory) {
|
|
2
35
|
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
36
|
var v = factory(require, exports);
|
|
4
37
|
if (v !== undefined) module.exports = v;
|
|
5
38
|
}
|
|
6
39
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports"
|
|
40
|
+
define(["require", "exports"], factory);
|
|
8
41
|
}
|
|
9
42
|
})(function (require, exports) {
|
|
10
43
|
"use strict";
|
|
44
|
+
var __syncRequire = typeof module === "object" && typeof module.exports === "object";
|
|
11
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
46
|
exports.loadRollUpdater = loadRollUpdater;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
engine.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
47
|
+
function loadRollUpdater(engine) {
|
|
48
|
+
engine.checkVersion("4.0.0-alpha.1");
|
|
49
|
+
engine.register(e => {
|
|
50
|
+
e.addParticleUpdater("roll", async () => {
|
|
51
|
+
const { RollUpdater } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./RollUpdater.js"))) : new Promise((resolve_1, reject_1) => { require(["./RollUpdater.js"], resolve_1, reject_1); }).then(__importStar));
|
|
52
|
+
return new RollUpdater(e);
|
|
53
|
+
});
|
|
54
|
+
});
|
|
19
55
|
}
|
|
20
56
|
});
|