@tsparticles/slim 3.0.0-beta.2 → 3.0.0-beta.4

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.
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see tsparticles.slim.min.js.LICENSE.txt */
2
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"),require("@tsparticles/move-base"),require("@tsparticles/shape-circle"),require("@tsparticles/updater-color"),require("@tsparticles/updater-opacity"),require("@tsparticles/updater-out-modes"),require("@tsparticles/updater-size"),require("@tsparticles/plugin-easing-quad"),require("@tsparticles/interaction-external-attract"),require("@tsparticles/interaction-external-bounce"),require("@tsparticles/interaction-external-bubble"),require("@tsparticles/interaction-external-connect"),require("@tsparticles/interaction-external-grab"),require("@tsparticles/interaction-external-pause"),require("@tsparticles/interaction-external-push"),require("@tsparticles/interaction-external-remove"),require("@tsparticles/interaction-external-repulse"),require("@tsparticles/interaction-external-slow"),require("@tsparticles/shape-image"),require("@tsparticles/updater-life"),require("@tsparticles/shape-line"),require("@tsparticles/move-parallax"),require("@tsparticles/interaction-particles-attract"),require("@tsparticles/interaction-particles-collisions"),require("@tsparticles/interaction-particles-links"),require("@tsparticles/shape-polygon"),require("@tsparticles/shape-square"),require("@tsparticles/shape-star"),require("@tsparticles/updater-stroke-color"),require("@tsparticles/shape-text"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine","@tsparticles/move-base","@tsparticles/shape-circle","@tsparticles/updater-color","@tsparticles/updater-opacity","@tsparticles/updater-out-modes","@tsparticles/updater-size","@tsparticles/plugin-easing-quad","@tsparticles/interaction-external-attract","@tsparticles/interaction-external-bounce","@tsparticles/interaction-external-bubble","@tsparticles/interaction-external-connect","@tsparticles/interaction-external-grab","@tsparticles/interaction-external-pause","@tsparticles/interaction-external-push","@tsparticles/interaction-external-remove","@tsparticles/interaction-external-repulse","@tsparticles/interaction-external-slow","@tsparticles/shape-image","@tsparticles/updater-life","@tsparticles/shape-line","@tsparticles/move-parallax","@tsparticles/interaction-particles-attract","@tsparticles/interaction-particles-collisions","@tsparticles/interaction-particles-links","@tsparticles/shape-polygon","@tsparticles/shape-square","@tsparticles/shape-star","@tsparticles/updater-stroke-color","@tsparticles/shape-text"],t);else{var a="object"==typeof exports?t(require("@tsparticles/engine"),require("@tsparticles/move-base"),require("@tsparticles/shape-circle"),require("@tsparticles/updater-color"),require("@tsparticles/updater-opacity"),require("@tsparticles/updater-out-modes"),require("@tsparticles/updater-size"),require("@tsparticles/plugin-easing-quad"),require("@tsparticles/interaction-external-attract"),require("@tsparticles/interaction-external-bounce"),require("@tsparticles/interaction-external-bubble"),require("@tsparticles/interaction-external-connect"),require("@tsparticles/interaction-external-grab"),require("@tsparticles/interaction-external-pause"),require("@tsparticles/interaction-external-push"),require("@tsparticles/interaction-external-remove"),require("@tsparticles/interaction-external-repulse"),require("@tsparticles/interaction-external-slow"),require("@tsparticles/shape-image"),require("@tsparticles/updater-life"),require("@tsparticles/shape-line"),require("@tsparticles/move-parallax"),require("@tsparticles/interaction-particles-attract"),require("@tsparticles/interaction-particles-collisions"),require("@tsparticles/interaction-particles-links"),require("@tsparticles/shape-polygon"),require("@tsparticles/shape-square"),require("@tsparticles/shape-star"),require("@tsparticles/updater-stroke-color"),require("@tsparticles/shape-text")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var r in a)("object"==typeof exports?exports:e)[r]=a[r]}}(this,((e,t,a,r,i,s,o,n,l,c,p,u,d,w,x,h,q,m,v,b,y,f,g,S,P,k,I,E,R,O)=>(()=>{"use strict";var j={533:t=>{t.exports=e},517:e=>{e.exports=l},201:e=>{e.exports=c},721:e=>{e.exports=p},971:e=>{e.exports=u},625:e=>{e.exports=d},591:e=>{e.exports=w},381:e=>{e.exports=x},440:e=>{e.exports=h},186:e=>{e.exports=q},165:e=>{e.exports=m},266:e=>{e.exports=g},611:e=>{e.exports=S},164:e=>{e.exports=P},619:e=>{e.exports=t},575:e=>{e.exports=f},194:e=>{e.exports=n},163:e=>{e.exports=a},885:e=>{e.exports=v},137:e=>{e.exports=y},907:e=>{e.exports=k},652:e=>{e.exports=I},960:e=>{e.exports=E},727:e=>{e.exports=O},501:e=>{e.exports=r},84:e=>{e.exports=b},686:e=>{e.exports=i},290:e=>{e.exports=s},2:e=>{e.exports=o},204:e=>{e.exports=R}},z={};function C(e){var t=z[e];if(void 0!==t)return t.exports;var a=z[e]={exports:{}};return j[e](a,a.exports,C),a.exports}C.d=(e,t)=>{for(var a in t)C.o(t,a)&&!C.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},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 J={};return(()=>{C.r(J),C.d(J,{loadSlim:()=>D});var e=C(533);class t{static init(a){const r=new t,i=a.selector;if(!i)throw new Error("No selector provided");const s=document.querySelector(i);if(!s)throw new Error("No element found for selector");return e.tsParticles.load({id:i.replace(".","").replace("!",""),element:s,options:{fullScreen:{enable:!1},particles:{color:{value:a.color??"!000000"},links:{color:"random",distance:a.minDistance??120,enable:a.connectParticles??!1},move:{enable:!0,speed:a.speed??.5},number:{value:a.maxParticles??100},size:{value:{min:1,max:a.sizeVariations??3}}},responsive:a.responsive?.map((e=>({maxWidth:e.breakpoint,options:{particles:{color:{value:e.options?.color},links:{distance:e.options?.minDistance,enable:e.options?.connectParticles},number:{value:a.maxParticles},move:{enable:!0,speed:e.options?.speed},size:{value:e.options?.sizeVariations}}}})))}}).then((e=>{r._container=e})),r}destroy(){const e=this._container;e&&e.destroy()}pauseAnimation(){const e=this._container;e&&e.pause()}resumeAnimation(){const e=this._container;e&&e.play()}}const a=e=>{const{particlesJS:a,pJSDom:r}=(e=>{const t=(t,a)=>e.load({id:t,options:a});return t.load=(t,a,r)=>{e.load({id:t,url:a}).then((e=>{e&&r(e)})).catch((()=>{r(void 0)}))},t.setOnClickHandler=t=>{e.setOnClickHandler(t)},{particlesJS:t,pJSDom:e.dom()}})(e);return window.particlesJS=a,window.pJSDom=r,window.Particles=t,{particlesJS:a,pJSDom:r,Particles:t}};var r=C(619),i=C(163),s=C(501),o=C(686),n=C(290),l=C(2);var c=C(194),p=C(517),u=C(201),d=C(721),w=C(971),x=C(625),h=C(591),q=C(381),m=C(440),v=C(186),b=C(165),y=C(885),f=C(84),g=C(137),S=C(575),P=C(266),k=C(611),I=C(164),E=C(907);class R{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=(0,e.setRangeValue)(t.speed)),void 0!==t.decay&&(this.decay=(0,e.setRangeValue)(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class O extends e.ValueWithRandom{constructor(){super(),this.animation=new R,this.direction="clockwise",this.path=!1,this.value=0}load(e){e&&(super.load(e),void 0!==e.direction&&(this.direction=e.direction),this.animation.load(e.animation),void 0!==e.path&&(this.path=e.path))}}class j{constructor(e){this.container=e}init(t){const a=t.options.rotate;if(!a)return;t.rotate={enable:a.animation.enable,value:(0,e.getRangeValue)(a.value)*Math.PI/180},t.pathRotation=a.path;let r=a.direction;if("random"===r){r=Math.floor(2*(0,e.getRandom)())>0?"counter-clockwise":"clockwise"}switch(r){case"counter-clockwise":case"counterClockwise":t.rotate.status="decreasing";break;case"clockwise":t.rotate.status="increasing"}const i=a.animation;i.enable&&(t.rotate.decay=1-(0,e.getRangeValue)(i.decay),t.rotate.velocity=(0,e.getRangeValue)(i.speed)/360*this.container.retina.reduceFactor,i.sync||(t.rotate.velocity*=(0,e.getRandom)())),t.rotation=t.rotate.value}isEnabled(e){const t=e.options.rotate;return!!t&&(!e.destroyed&&!e.spawning&&t.animation.enable&&!t.path)}loadOptions(e,...t){e.rotate||(e.rotate=new O);for(const a of t)e.rotate.load(a?.rotate)}update(e,t){this.isEnabled(e)&&(!function(e,t){const a=e.rotate,r=e.options.rotate;if(!a||!r)return;const i=r.animation,s=(a.velocity??0)*t.factor,o=2*Math.PI,n=a.decay??1;i.enable&&("increasing"===a.status?(a.value+=s,a.value>o&&(a.value-=o)):(a.value-=s,a.value<0&&(a.value+=o)),a.velocity&&1!==n&&(a.velocity*=n))}(e,t),e.rotation=e.rotate?.value??0)}}var z=C(652),M=C(960),V=C(204),U=C(727);async function D(e,t=!0){a(e),await(0,S.loadParallaxMover)(e,!1),await(0,p.loadExternalAttractInteraction)(e,!1),await(0,u.loadExternalBounceInteraction)(e,!1),await(0,d.loadExternalBubbleInteraction)(e,!1),await(0,w.loadExternalConnectInteraction)(e,!1),await(0,x.loadExternalGrabInteraction)(e,!1),await(0,h.loadExternalPauseInteraction)(e,!1),await(0,q.loadExternalPushInteraction)(e,!1),await(0,m.loadExternalRemoveInteraction)(e,!1),await(0,v.loadExternalRepulseInteraction)(e,!1),await(0,b.loadExternalSlowInteraction)(e,!1),await(0,P.loadParticlesAttractInteraction)(e,!1),await(0,k.loadParticlesCollisionsInteraction)(e,!1),await(0,I.loadParticlesLinksInteraction)(e,!1),await(0,c.loadEasingQuadPlugin)(),await(0,y.loadImageShape)(e,!1),await(0,g.loadLineShape)(e,!1),await(0,E.loadPolygonShape)(e,!1),await(0,z.loadSquareShape)(e,!1),await(0,M.loadStarShape)(e,!1),await(0,U.loadTextShape)(e,!1),await(0,f.loadLifeUpdater)(e,!1),await async function(e,t=!0){await e.addParticleUpdater("rotate",(e=>new j(e)),t)}(e,!1),await(0,V.loadStrokeColorUpdater)(e,!1),await async function(e,t=!0){await(0,r.loadBaseMover)(e,!1),await(0,i.loadCircleShape)(e,!1),await(0,s.loadColorUpdater)(e,!1),await(0,o.loadOpacityUpdater)(e,!1),await(0,n.loadOutModesUpdater)(e,!1),await(0,l.loadSizeUpdater)(e,!1),await e.refresh(t)}(e,t)}})(),J})()));
2
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/pjs"),require("@tsparticles/basic"),require("@tsparticles/plugin-easing-quad"),require("@tsparticles/interaction-external-attract"),require("@tsparticles/interaction-external-bounce"),require("@tsparticles/interaction-external-bubble"),require("@tsparticles/interaction-external-connect"),require("@tsparticles/interaction-external-grab"),require("@tsparticles/interaction-external-pause"),require("@tsparticles/interaction-external-push"),require("@tsparticles/interaction-external-remove"),require("@tsparticles/interaction-external-repulse"),require("@tsparticles/interaction-external-slow"),require("@tsparticles/shape-image"),require("@tsparticles/updater-life"),require("@tsparticles/shape-line"),require("@tsparticles/move-parallax"),require("@tsparticles/interaction-particles-attract"),require("@tsparticles/interaction-particles-collisions"),require("@tsparticles/interaction-particles-links"),require("@tsparticles/shape-polygon"),require("@tsparticles/updater-rotate"),require("@tsparticles/shape-square"),require("@tsparticles/shape-star"),require("@tsparticles/updater-stroke-color"),require("@tsparticles/shape-text"));else if("function"==typeof define&&define.amd)define(["@tsparticles/pjs","@tsparticles/basic","@tsparticles/plugin-easing-quad","@tsparticles/interaction-external-attract","@tsparticles/interaction-external-bounce","@tsparticles/interaction-external-bubble","@tsparticles/interaction-external-connect","@tsparticles/interaction-external-grab","@tsparticles/interaction-external-pause","@tsparticles/interaction-external-push","@tsparticles/interaction-external-remove","@tsparticles/interaction-external-repulse","@tsparticles/interaction-external-slow","@tsparticles/shape-image","@tsparticles/updater-life","@tsparticles/shape-line","@tsparticles/move-parallax","@tsparticles/interaction-particles-attract","@tsparticles/interaction-particles-collisions","@tsparticles/interaction-particles-links","@tsparticles/shape-polygon","@tsparticles/updater-rotate","@tsparticles/shape-square","@tsparticles/shape-star","@tsparticles/updater-stroke-color","@tsparticles/shape-text"],t);else{var r="object"==typeof exports?t(require("@tsparticles/pjs"),require("@tsparticles/basic"),require("@tsparticles/plugin-easing-quad"),require("@tsparticles/interaction-external-attract"),require("@tsparticles/interaction-external-bounce"),require("@tsparticles/interaction-external-bubble"),require("@tsparticles/interaction-external-connect"),require("@tsparticles/interaction-external-grab"),require("@tsparticles/interaction-external-pause"),require("@tsparticles/interaction-external-push"),require("@tsparticles/interaction-external-remove"),require("@tsparticles/interaction-external-repulse"),require("@tsparticles/interaction-external-slow"),require("@tsparticles/shape-image"),require("@tsparticles/updater-life"),require("@tsparticles/shape-line"),require("@tsparticles/move-parallax"),require("@tsparticles/interaction-particles-attract"),require("@tsparticles/interaction-particles-collisions"),require("@tsparticles/interaction-particles-links"),require("@tsparticles/shape-polygon"),require("@tsparticles/updater-rotate"),require("@tsparticles/shape-square"),require("@tsparticles/shape-star"),require("@tsparticles/updater-stroke-color"),require("@tsparticles/shape-text")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,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,n,o,l,p,c,u,d,x,w,q,b,h,f,g,v,m,y,S,I,P)=>(()=>{"use strict";var j={574:e=>{e.exports=t},517:e=>{e.exports=a},201:e=>{e.exports=i},721:e=>{e.exports=s},971:e=>{e.exports=n},625:e=>{e.exports=o},591:e=>{e.exports=l},381:e=>{e.exports=p},440:e=>{e.exports=c},186:e=>{e.exports=u},165:e=>{e.exports=d},266:e=>{e.exports=h},611:e=>{e.exports=f},164:e=>{e.exports=g},575:e=>{e.exports=b},860:t=>{t.exports=e},194:e=>{e.exports=r},885:e=>{e.exports=x},137:e=>{e.exports=q},907:e=>{e.exports=v},652:e=>{e.exports=y},960:e=>{e.exports=S},727:e=>{e.exports=P},84:e=>{e.exports=w},59:e=>{e.exports=m},204:e=>{e.exports=I}},E={};function k(e){var t=E[e];if(void 0!==t)return t.exports;var r=E[e]={exports:{}};return j[e](r,r.exports,k),r.exports}k.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return k.d(t,{a:t}),t},k.d=(e,t)=>{for(var r in t)k.o(t,r)&&!k.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},k.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),k.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var O={};return(()=>{k.r(O),k.d(O,{loadSlim:()=>j});var e=k(860),t=k(574),r=k(194),a=k(517),i=k(201),s=k(721),n=k(971),o=k(625),l=k(591),p=k(381),c=k(440),u=k(186),d=k(165),x=k(885),w=k(84),q=k(137),b=k(575),h=k(266),f=k(611),g=k(164),v=k(907),m=k(59),y=k(652),S=k(960),I=k(204),P=k(727);async function j(j,E=!0){(0,e.initPjs)(j),await(0,b.loadParallaxMover)(j,!1),await(0,a.loadExternalAttractInteraction)(j,!1),await(0,i.loadExternalBounceInteraction)(j,!1),await(0,s.loadExternalBubbleInteraction)(j,!1),await(0,n.loadExternalConnectInteraction)(j,!1),await(0,o.loadExternalGrabInteraction)(j,!1),await(0,l.loadExternalPauseInteraction)(j,!1),await(0,p.loadExternalPushInteraction)(j,!1),await(0,c.loadExternalRemoveInteraction)(j,!1),await(0,u.loadExternalRepulseInteraction)(j,!1),await(0,d.loadExternalSlowInteraction)(j,!1),await(0,h.loadParticlesAttractInteraction)(j,!1),await(0,f.loadParticlesCollisionsInteraction)(j,!1),await(0,g.loadParticlesLinksInteraction)(j,!1),await(0,r.loadEasingQuadPlugin)(),await(0,x.loadImageShape)(j,!1),await(0,q.loadLineShape)(j,!1),await(0,v.loadPolygonShape)(j,!1),await(0,y.loadSquareShape)(j,!1),await(0,S.loadStarShape)(j,!1),await(0,P.loadTextShape)(j,!1),await(0,w.loadLifeUpdater)(j,!1),await(0,m.loadRotateUpdater)(j,!1),await(0,I.loadStrokeColorUpdater)(j,!1),await(0,t.loadBasic)(j,E)}})(),O})()));
@@ -1 +1 @@
1
- /*! tsParticles Slim v3.0.0-beta.2 by Matteo Bruni */
1
+ /*! tsParticles Slim v3.0.0-beta.4 by Matteo Bruni */
package/umd/index.js CHANGED
@@ -4,13 +4,13 @@
4
4
  if (v !== undefined) module.exports = v;
5
5
  }
6
6
  else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "@tsparticles/particles.js", "@tsparticles/basic", "@tsparticles/plugin-easing-quad", "@tsparticles/interaction-external-attract", "@tsparticles/interaction-external-bounce", "@tsparticles/interaction-external-bubble", "@tsparticles/interaction-external-connect", "@tsparticles/interaction-external-grab", "@tsparticles/interaction-external-pause", "@tsparticles/interaction-external-push", "@tsparticles/interaction-external-remove", "@tsparticles/interaction-external-repulse", "@tsparticles/interaction-external-slow", "@tsparticles/shape-image", "@tsparticles/updater-life", "@tsparticles/shape-line", "@tsparticles/move-parallax", "@tsparticles/interaction-particles-attract", "@tsparticles/interaction-particles-collisions", "@tsparticles/interaction-particles-links", "@tsparticles/shape-polygon", "@tsparticles/updater-rotate", "@tsparticles/shape-square", "@tsparticles/shape-star", "@tsparticles/updater-stroke-color", "@tsparticles/shape-text"], factory);
7
+ define(["require", "exports", "@tsparticles/pjs", "@tsparticles/basic", "@tsparticles/plugin-easing-quad", "@tsparticles/interaction-external-attract", "@tsparticles/interaction-external-bounce", "@tsparticles/interaction-external-bubble", "@tsparticles/interaction-external-connect", "@tsparticles/interaction-external-grab", "@tsparticles/interaction-external-pause", "@tsparticles/interaction-external-push", "@tsparticles/interaction-external-remove", "@tsparticles/interaction-external-repulse", "@tsparticles/interaction-external-slow", "@tsparticles/shape-image", "@tsparticles/updater-life", "@tsparticles/shape-line", "@tsparticles/move-parallax", "@tsparticles/interaction-particles-attract", "@tsparticles/interaction-particles-collisions", "@tsparticles/interaction-particles-links", "@tsparticles/shape-polygon", "@tsparticles/updater-rotate", "@tsparticles/shape-square", "@tsparticles/shape-star", "@tsparticles/updater-stroke-color", "@tsparticles/shape-text"], factory);
8
8
  }
9
9
  })(function (require, exports) {
10
10
  "use strict";
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.loadSlim = void 0;
13
- const particles_js_1 = require("@tsparticles/particles.js");
13
+ const pjs_1 = require("@tsparticles/pjs");
14
14
  const basic_1 = require("@tsparticles/basic");
15
15
  const plugin_easing_quad_1 = require("@tsparticles/plugin-easing-quad");
16
16
  const interaction_external_attract_1 = require("@tsparticles/interaction-external-attract");
@@ -37,7 +37,7 @@
37
37
  const updater_stroke_color_1 = require("@tsparticles/updater-stroke-color");
38
38
  const shape_text_1 = require("@tsparticles/shape-text");
39
39
  async function loadSlim(engine, refresh = true) {
40
- (0, particles_js_1.initPjs)(engine);
40
+ (0, pjs_1.initPjs)(engine);
41
41
  await (0, move_parallax_1.loadParallaxMover)(engine, false);
42
42
  await (0, interaction_external_attract_1.loadExternalAttractInteraction)(engine, false);
43
43
  await (0, interaction_external_bounce_1.loadExternalBounceInteraction)(engine, false);