@tsparticles/preset-triangles 3.0.0-alpha.1 → 3.0.0-beta.2

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.
@@ -4,68 +4,33 @@
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
- * v3.0.0-alpha.1
7
+ * v3.0.0-beta.2
8
8
  */
9
9
  (function webpackUniversalModuleDefinition(root, factory) {
10
10
  if(typeof exports === 'object' && typeof module === 'object')
11
- module.exports = factory(require("@tsparticles/move-base"), require("@tsparticles/shape-circle"), require("@tsparticles/updater-color"), require("@tsparticles/updater-opacity"), require("@tsparticles/updater-out-modes"), require("@tsparticles/interaction-particles-links"), require("@tsparticles/updater-size"));
11
+ module.exports = factory(require("@tsparticles/basic"), require("@tsparticles/interaction-particles-links"));
12
12
  else if(typeof define === 'function' && define.amd)
13
- define(["@tsparticles/move-base", "@tsparticles/shape-circle", "@tsparticles/updater-color", "@tsparticles/updater-opacity", "@tsparticles/updater-out-modes", "@tsparticles/interaction-particles-links", "@tsparticles/updater-size"], factory);
13
+ define(["@tsparticles/basic", "@tsparticles/interaction-particles-links"], factory);
14
14
  else {
15
- var a = typeof exports === 'object' ? factory(require("@tsparticles/move-base"), require("@tsparticles/shape-circle"), require("@tsparticles/updater-color"), require("@tsparticles/updater-opacity"), require("@tsparticles/updater-out-modes"), require("@tsparticles/interaction-particles-links"), require("@tsparticles/updater-size")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]);
15
+ var a = typeof exports === 'object' ? factory(require("@tsparticles/basic"), require("@tsparticles/interaction-particles-links")) : factory(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__619__, __WEBPACK_EXTERNAL_MODULE__163__, __WEBPACK_EXTERNAL_MODULE__501__, __WEBPACK_EXTERNAL_MODULE__686__, __WEBPACK_EXTERNAL_MODULE__290__, __WEBPACK_EXTERNAL_MODULE__164__, __WEBPACK_EXTERNAL_MODULE__2__) => {
18
+ })(this, (__WEBPACK_EXTERNAL_MODULE__574__, __WEBPACK_EXTERNAL_MODULE__164__) => {
19
19
  return /******/ (() => { // webpackBootstrap
20
20
  /******/ "use strict";
21
21
  /******/ var __webpack_modules__ = ({
22
22
 
23
- /***/ 164:
24
- /***/ ((module) => {
25
-
26
- module.exports = __WEBPACK_EXTERNAL_MODULE__164__;
27
-
28
- /***/ }),
29
-
30
- /***/ 619:
31
- /***/ ((module) => {
32
-
33
- module.exports = __WEBPACK_EXTERNAL_MODULE__619__;
34
-
35
- /***/ }),
36
-
37
- /***/ 163:
23
+ /***/ 574:
38
24
  /***/ ((module) => {
39
25
 
40
- module.exports = __WEBPACK_EXTERNAL_MODULE__163__;
26
+ module.exports = __WEBPACK_EXTERNAL_MODULE__574__;
41
27
 
42
28
  /***/ }),
43
29
 
44
- /***/ 501:
45
- /***/ ((module) => {
46
-
47
- module.exports = __WEBPACK_EXTERNAL_MODULE__501__;
48
-
49
- /***/ }),
50
-
51
- /***/ 686:
52
- /***/ ((module) => {
53
-
54
- module.exports = __WEBPACK_EXTERNAL_MODULE__686__;
55
-
56
- /***/ }),
57
-
58
- /***/ 290:
59
- /***/ ((module) => {
60
-
61
- module.exports = __WEBPACK_EXTERNAL_MODULE__290__;
62
-
63
- /***/ }),
64
-
65
- /***/ 2:
30
+ /***/ 164:
66
31
  /***/ ((module) => {
67
32
 
68
- module.exports = __WEBPACK_EXTERNAL_MODULE__2__;
33
+ module.exports = __WEBPACK_EXTERNAL_MODULE__164__;
69
34
 
70
35
  /***/ })
71
36
 
@@ -133,29 +98,22 @@ __webpack_require__.r(__webpack_exports__);
133
98
 
134
99
  // EXPORTS
135
100
  __webpack_require__.d(__webpack_exports__, {
136
- "loadTrianglesPreset": () => (/* binding */ loadTrianglesPreset)
101
+ loadTrianglesPreset: () => (/* binding */ loadTrianglesPreset)
137
102
  });
138
103
 
139
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/move-base","commonjs2":"@tsparticles/move-base","amd":"@tsparticles/move-base","root":"window"}
140
- var move_base_root_window_ = __webpack_require__(619);
141
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-circle","commonjs2":"@tsparticles/shape-circle","amd":"@tsparticles/shape-circle","root":"window"}
142
- var shape_circle_root_window_ = __webpack_require__(163);
143
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-color","commonjs2":"@tsparticles/updater-color","amd":"@tsparticles/updater-color","root":"window"}
144
- var updater_color_root_window_ = __webpack_require__(501);
145
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-opacity","commonjs2":"@tsparticles/updater-opacity","amd":"@tsparticles/updater-opacity","root":"window"}
146
- var updater_opacity_root_window_ = __webpack_require__(686);
147
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-out-modes","commonjs2":"@tsparticles/updater-out-modes","amd":"@tsparticles/updater-out-modes","root":"window"}
148
- var updater_out_modes_root_window_ = __webpack_require__(290);
104
+ // EXTERNAL MODULE: external {"commonjs":"@tsparticles/basic","commonjs2":"@tsparticles/basic","amd":"@tsparticles/basic","root":"window"}
105
+ var basic_root_window_ = __webpack_require__(574);
149
106
  // EXTERNAL MODULE: external {"commonjs":"@tsparticles/interaction-particles-links","commonjs2":"@tsparticles/interaction-particles-links","amd":"@tsparticles/interaction-particles-links","root":"window"}
150
107
  var interaction_particles_links_root_window_ = __webpack_require__(164);
151
- // EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-size","commonjs2":"@tsparticles/updater-size","amd":"@tsparticles/updater-size","root":"window"}
152
- var updater_size_root_window_ = __webpack_require__(2);
153
108
  ;// CONCATENATED MODULE: ./dist/browser/options.js
154
109
  const options = {
155
110
  background: {
156
111
  color: "#000000"
157
112
  },
158
113
  particles: {
114
+ number: {
115
+ value: 100
116
+ },
159
117
  links: {
160
118
  distance: 125,
161
119
  enable: true,
@@ -180,20 +138,10 @@ const options = {
180
138
 
181
139
 
182
140
 
183
-
184
-
185
-
186
-
187
-
188
- async function loadTrianglesPreset(engine) {
189
- await (0,move_base_root_window_.loadBaseMover)(engine);
190
- await (0,shape_circle_root_window_.loadCircleShape)(engine);
191
- await (0,updater_color_root_window_.loadColorUpdater)(engine);
192
- await (0,interaction_particles_links_root_window_.loadParticlesLinksInteraction)(engine);
193
- await (0,updater_out_modes_root_window_.loadOutModesUpdater)(engine);
194
- await (0,updater_opacity_root_window_.loadOpacityUpdater)(engine);
195
- await (0,updater_size_root_window_.loadSizeUpdater)(engine);
196
- await engine.addPreset("triangles", options);
141
+ async function loadTrianglesPreset(engine, refresh = true) {
142
+ await (0,basic_root_window_.loadBasic)(engine, false);
143
+ await (0,interaction_particles_links_root_window_.loadParticlesLinksInteraction)(engine, false);
144
+ await engine.addPreset("triangles", options, refresh);
197
145
  }
198
146
  })();
199
147
 
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see tsparticles.preset.triangles.min.js.LICENSE.txt */
2
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/move-base"),require("@tsparticles/shape-circle"),require("@tsparticles/updater-color"),require("@tsparticles/updater-opacity"),require("@tsparticles/updater-out-modes"),require("@tsparticles/interaction-particles-links"),require("@tsparticles/updater-size"));else if("function"==typeof define&&define.amd)define(["@tsparticles/move-base","@tsparticles/shape-circle","@tsparticles/updater-color","@tsparticles/updater-opacity","@tsparticles/updater-out-modes","@tsparticles/interaction-particles-links","@tsparticles/updater-size"],t);else{var r="object"==typeof exports?t(require("@tsparticles/move-base"),require("@tsparticles/shape-circle"),require("@tsparticles/updater-color"),require("@tsparticles/updater-opacity"),require("@tsparticles/updater-out-modes"),require("@tsparticles/interaction-particles-links"),require("@tsparticles/updater-size")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var a in r)("object"==typeof exports?exports:e)[a]=r[a]}}(this,((e,t,r,a,i,s,o)=>(()=>{"use strict";var p={164:e=>{e.exports=s},619:t=>{t.exports=e},163:e=>{e.exports=t},501:e=>{e.exports=r},686:e=>{e.exports=a},290:e=>{e.exports=i},2:e=>{e.exports=o}},l={};function c(e){var t=l[e];if(void 0!==t)return t.exports;var r=l[e]={exports:{}};return p[e](r,r.exports,c),r.exports}c.d=(e,t)=>{for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};return(()=>{c.r(d),c.d(d,{loadTrianglesPreset:()=>l});var e=c(619),t=c(163),r=c(501),a=c(686),i=c(290),s=c(164),o=c(2);const p={background:{color:"#000000"},particles:{links:{distance:125,enable:!0,triangles:{enable:!0,opacity:.1}},move:{enable:!0,speed:5},size:{value:1},shape:{type:"circle"}}};async function l(l){await(0,e.loadBaseMover)(l),await(0,t.loadCircleShape)(l),await(0,r.loadColorUpdater)(l),await(0,s.loadParticlesLinksInteraction)(l),await(0,i.loadOutModesUpdater)(l),await(0,a.loadOpacityUpdater)(l),await(0,o.loadSizeUpdater)(l),await l.addPreset("triangles",p)}})(),d})()));
2
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/basic"),require("@tsparticles/interaction-particles-links"));else if("function"==typeof define&&define.amd)define(["@tsparticles/basic","@tsparticles/interaction-particles-links"],t);else{var r="object"==typeof exports?t(require("@tsparticles/basic"),require("@tsparticles/interaction-particles-links")):t(e.window,e.window);for(var i in r)("object"==typeof exports?exports:e)[i]=r[i]}}(this,((e,t)=>(()=>{"use strict";var r={574:t=>{t.exports=e},164:e=>{e.exports=t}},i={};function o(e){var t=i[e];if(void 0!==t)return t.exports;var a=i[e]={exports:{}};return r[e](a,a.exports,o),a.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{o.r(a),o.d(a,{loadTrianglesPreset:()=>i});var e=o(574),t=o(164);const r={background:{color:"#000000"},particles:{number:{value:100},links:{distance:125,enable:!0,triangles:{enable:!0,opacity:.1}},move:{enable:!0,speed:5},size:{value:1},shape:{type:"circle"}}};async function i(i,o=!0){await(0,e.loadBasic)(i,!1),await(0,t.loadParticlesLinksInteraction)(i,!1),await i.addPreset("triangles",r,o)}})(),a})()));
@@ -1,8 +1 @@
1
- /*!
2
- * Author : Matteo Bruni
3
- * MIT license: https://opensource.org/licenses/MIT
4
- * Demo / Generator : https://particles.js.org/
5
- * GitHub : https://www.github.com/matteobruni/tsparticles
6
- * How to use? : Check the GitHub README
7
- * v3.0.0-alpha.1
8
- */
1
+ /*! tsParticles Triangles Preset v3.0.0-beta.2 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 loadTrianglesPreset(engine: Engine): Promise<void>;
2
+ export declare function loadTrianglesPreset(engine: Engine, refresh?: boolean): Promise<void>;
package/umd/bundle.js CHANGED
@@ -14,7 +14,5 @@
14
14
  Object.defineProperty(exports, "loadTrianglesPreset", { enumerable: true, get: function () { return _1.loadTrianglesPreset; } });
15
15
  const engine_1 = require("@tsparticles/engine");
16
16
  Object.defineProperty(exports, "tsParticles", { enumerable: true, get: function () { return engine_1.tsParticles; } });
17
- (async () => {
18
- await (0, _1.loadTrianglesPreset)(engine_1.tsParticles);
19
- })();
17
+ (0, _1.loadTrianglesPreset)(engine_1.tsParticles);
20
18
  });
package/umd/index.js CHANGED
@@ -4,29 +4,19 @@
4
4
  if (v !== undefined) module.exports = v;
5
5
  }
6
6
  else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "@tsparticles/move-base", "@tsparticles/shape-circle", "@tsparticles/updater-color", "@tsparticles/updater-opacity", "@tsparticles/updater-out-modes", "@tsparticles/interaction-particles-links", "@tsparticles/updater-size", "./options"], factory);
7
+ define(["require", "exports", "@tsparticles/basic", "@tsparticles/interaction-particles-links", "./options"], factory);
8
8
  }
9
9
  })(function (require, exports) {
10
10
  "use strict";
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.loadTrianglesPreset = void 0;
13
- const move_base_1 = require("@tsparticles/move-base");
14
- const shape_circle_1 = require("@tsparticles/shape-circle");
15
- const updater_color_1 = require("@tsparticles/updater-color");
16
- const updater_opacity_1 = require("@tsparticles/updater-opacity");
17
- const updater_out_modes_1 = require("@tsparticles/updater-out-modes");
13
+ const basic_1 = require("@tsparticles/basic");
18
14
  const interaction_particles_links_1 = require("@tsparticles/interaction-particles-links");
19
- const updater_size_1 = require("@tsparticles/updater-size");
20
15
  const options_1 = require("./options");
21
- async function loadTrianglesPreset(engine) {
22
- await (0, move_base_1.loadBaseMover)(engine);
23
- await (0, shape_circle_1.loadCircleShape)(engine);
24
- await (0, updater_color_1.loadColorUpdater)(engine);
25
- await (0, interaction_particles_links_1.loadParticlesLinksInteraction)(engine);
26
- await (0, updater_out_modes_1.loadOutModesUpdater)(engine);
27
- await (0, updater_opacity_1.loadOpacityUpdater)(engine);
28
- await (0, updater_size_1.loadSizeUpdater)(engine);
29
- await engine.addPreset("triangles", options_1.options);
16
+ async function loadTrianglesPreset(engine, refresh = true) {
17
+ await (0, basic_1.loadBasic)(engine, false);
18
+ await (0, interaction_particles_links_1.loadParticlesLinksInteraction)(engine, false);
19
+ await engine.addPreset("triangles", options_1.options, refresh);
30
20
  }
31
21
  exports.loadTrianglesPreset = loadTrianglesPreset;
32
22
  });
package/umd/options.js CHANGED
@@ -15,6 +15,9 @@
15
15
  color: "#000000",
16
16
  },
17
17
  particles: {
18
+ number: {
19
+ value: 100,
20
+ },
18
21
  links: {
19
22
  distance: 125,
20
23
  enable: true,