tsparticles 1.39.2 → 1.39.3
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/Core/Container.js +3 -3
- package/Core/Utils/InteractionManager.d.ts +2 -2
- package/Core/Utils/InteractionManager.js +2 -0
- package/Options/Classes/Options.js +1 -1
- package/browser/Core/Container.js +3 -3
- package/browser/Core/Utils/InteractionManager.d.ts +2 -2
- package/browser/Core/Utils/InteractionManager.js +2 -0
- package/browser/Options/Classes/Options.js +1 -1
- package/esm/Core/Container.js +3 -3
- package/esm/Core/Utils/InteractionManager.d.ts +2 -2
- package/esm/Core/Utils/InteractionManager.js +2 -0
- package/esm/Options/Classes/Options.js +1 -1
- package/package.json +11 -5
- package/report.html +2 -2
- package/report.slim.html +2 -2
- package/tsparticles.engine.js +6 -4
- package/tsparticles.engine.min.js +2 -2
- package/tsparticles.interaction.external.attract.js +6 -4
- package/tsparticles.interaction.external.attract.min.js +1 -1
- package/tsparticles.interaction.external.bounce.js +6 -4
- package/tsparticles.interaction.external.bounce.min.js +1 -1
- package/tsparticles.interaction.external.bubble.js +6 -4
- package/tsparticles.interaction.external.bubble.min.js +1 -1
- package/tsparticles.interaction.external.connect.js +6 -4
- package/tsparticles.interaction.external.connect.min.js +1 -1
- package/tsparticles.interaction.external.grab.js +6 -4
- package/tsparticles.interaction.external.grab.min.js +1 -1
- package/tsparticles.interaction.external.repulse.js +6 -4
- package/tsparticles.interaction.external.repulse.min.js +1 -1
- package/tsparticles.interaction.external.trail.js +6 -4
- package/tsparticles.interaction.external.trail.min.js +1 -1
- package/tsparticles.interaction.particles.attract.js +6 -4
- package/tsparticles.interaction.particles.attract.min.js +1 -1
- package/tsparticles.interaction.particles.collisions.js +6 -4
- package/tsparticles.interaction.particles.collisions.min.js +1 -1
- package/tsparticles.interaction.particles.links.js +6 -4
- package/tsparticles.interaction.particles.links.min.js +1 -1
- package/tsparticles.js +6 -4
- package/tsparticles.min.js +2 -2
- package/tsparticles.pathseg.min.js +1 -1
- package/tsparticles.plugins.absorbers.js +6 -4
- package/tsparticles.plugins.absorbers.min.js +1 -1
- package/tsparticles.plugins.emitters.js +6 -4
- package/tsparticles.plugins.emitters.min.js +1 -1
- package/tsparticles.plugins.polygonMask.js +6 -4
- package/tsparticles.plugins.polygonMask.min.js +1 -1
- package/tsparticles.shape.circle.min.js +1 -1
- package/tsparticles.shape.image.js +6 -4
- package/tsparticles.shape.image.min.js +1 -1
- package/tsparticles.shape.line.min.js +1 -1
- package/tsparticles.shape.polygon.min.js +1 -1
- package/tsparticles.shape.square.min.js +1 -1
- package/tsparticles.shape.star.min.js +1 -1
- package/tsparticles.shape.text.js +6 -4
- package/tsparticles.shape.text.min.js +1 -1
- package/tsparticles.slim.js +6 -4
- package/tsparticles.slim.min.js +2 -2
- package/tsparticles.updater.angle.js +6 -4
- package/tsparticles.updater.angle.min.js +1 -1
- package/tsparticles.updater.color.js +6 -4
- package/tsparticles.updater.color.min.js +1 -1
- package/tsparticles.updater.life.js +6 -4
- package/tsparticles.updater.life.min.js +1 -1
- package/tsparticles.updater.opacity.js +6 -4
- package/tsparticles.updater.opacity.min.js +1 -1
- package/tsparticles.updater.outModes.js +6 -4
- package/tsparticles.updater.outModes.min.js +1 -1
- package/tsparticles.updater.roll.js +6 -4
- package/tsparticles.updater.roll.min.js +1 -1
- package/tsparticles.updater.size.js +6 -4
- package/tsparticles.updater.size.min.js +1 -1
- package/tsparticles.updater.strokeColor.js +6 -4
- package/tsparticles.updater.strokeColor.min.js +1 -1
- package/tsparticles.updater.tilt.js +6 -4
- package/tsparticles.updater.tilt.min.js +1 -1
- package/tsparticles.updater.wobble.js +6 -4
- package/tsparticles.updater.wobble.min.js +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.39.
|
|
1
|
+
/*! tsParticles v1.39.3 by Matteo Bruni */
|
|
2
2
|
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(window,(function(){return function(){"use strict";var t={d:function(e,n){for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t,e){const n=t.x-e.x,o=t.y-e.y;return{dx:n,dy:o,distance:Math.sqrt(n*n+o*o)}}function o(t,e){switch(e){case"ease-out-quad":return 1-(1-t)**2;case"ease-out-cubic":return 1-(1-t)**3;case"ease-out-quart":return 1-(1-t)**4;case"ease-out-quint":return 1-(1-t)**5;case"ease-out-expo":return 1===t?1:1-Math.pow(2,-10*t);case"ease-out-sine":return Math.sin(t*Math.PI/2);case"ease-out-back":{const e=1.70158;return 1+(e+1)*Math.pow(t-1,3)+e*Math.pow(t-1,2)}case"ease-out-circ":return Math.sqrt(1-Math.pow(t-1,2));default:return t}}function i(t,e){return t===e||e instanceof Array&&e.indexOf(t)>-1}t.r(e),t.d(e,{loadExternalAttractInteraction:function(){return u}});class r extends class{constructor(t,e){this.position={x:t,y:e}}}{constructor(t,e,n){super(t,e),this.radius=n}contains(t){return e=t,o=this.position,n(e,o).distance<=this.radius;var e,o}intersects(t){const e=t,n=t,o=this.position,i=t.position,r=Math.abs(i.x-o.x),a=Math.abs(i.y-o.y),s=this.radius;if(void 0!==n.radius){return s+n.radius>Math.sqrt(r*r+a+a)}if(void 0!==e.size){const t=e.size.width,n=e.size.height,o=Math.pow(r-t,2)+Math.pow(a-n,2);return!(r>s+t||a>s+n)&&(r<=t||a<=n||o<=s*s)}return!1}}class a{}a.generatedAttribute="generated",a.randomColorValue="random",a.midColorValue="mid",a.touchEndEvent="touchend",a.mouseDownEvent="mousedown",a.mouseUpEvent="mouseup",a.mouseMoveEvent="mousemove",a.touchStartEvent="touchstart",a.touchMoveEvent="touchmove",a.mouseLeaveEvent="mouseleave",a.mouseOutEvent="mouseout",a.touchCancelEvent="touchcancel",a.resizeEvent="resize",a.visibilityChangeEvent="visibilitychange",a.noPolygonDataLoaded="No polygon data loaded.",a.noPolygonFound="No polygon found, you need to specify SVG url in config.";new Map,new Map,new Map,new Map,new Map,new Map,new Map;class s{constructor(t,e){let n,o;if(void 0===e){if("number"==typeof t)throw new Error("tsParticles - Vector not initialized correctly");const e=t;[n,o]=[e.x,e.y]}else[n,o]=[t,e];this.x=n,this.y=o}static clone(t){return s.create(t.x,t.y)}static create(t,e){return new s(t,e)}static get origin(){return s.create(0,0)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.updateFromAngle(t,this.length)}get length(){return Math.sqrt(this.x**2+this.y**2)}set length(t){this.updateFromAngle(this.angle,t)}add(t){return s.create(this.x+t.x,this.y+t.y)}addTo(t){this.x+=t.x,this.y+=t.y}sub(t){return s.create(this.x-t.x,this.y-t.y)}subFrom(t){this.x-=t.x,this.y-=t.y}mult(t){return s.create(this.x*t,this.y*t)}multTo(t){this.x*=t,this.y*=t}div(t){return s.create(this.x/t,this.y/t)}divTo(t){this.x/=t,this.y/=t}distanceTo(t){return this.sub(t).length}getLengthSq(){return this.x**2+this.y**2}distanceToSq(t){return this.sub(t).getLengthSq()}manhattanDistanceTo(t){return Math.abs(t.x-this.x)+Math.abs(t.y-this.y)}copy(){return s.clone(this)}setTo(t){this.x=t.x,this.y=t.y}rotate(t){return s.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t))}updateFromAngle(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}new WeakSet;class c extends class{constructor(t){this.container=t,this.type=0}}{constructor(t){super(t)}isEnabled(){const t=this.container,e=t.actualOptions,n=t.interactivity.mouse,o=e.interactivity.events;if(!(n.position&&o.onHover.enable||n.clickPosition&&o.onClick.enable))return!1;const r=o.onHover.mode,a=o.onClick.mode;return i("attract",r)||i("attract",a)}reset(){}interact(){const t=this.container,e=t.actualOptions,n=t.interactivity.status===a.mouseMoveEvent,o=e.interactivity.events,r=o.onHover.enable,s=o.onHover.mode,c=o.onClick.enable,u=o.onClick.mode;n&&r&&i("attract",s)?this.hoverAttract():c&&i("attract",u)&&this.clickAttract()}hoverAttract(){const t=this.container,e=t.interactivity.mouse.position;if(!e)return;const n=t.retina.attractModeDistance;this.processAttract(e,n,new r(e.x,e.y,n))}processAttract(t,e,i){const r=this.container,a=r.actualOptions.interactivity.modes.attract,c=r.particles.quadTree.query(i);for(const i of c){const{dx:r,dy:c,distance:l}=n(i.position,t),y=a.speed*a.factor,p=(u=o(1-l/e,a.easing)*y,h=0,d=a.maxSpeed,Math.min(Math.max(u,h),d)),v=s.create(0===l?y:r/l*p,0===l?y:c/l*p);i.position.subFrom(v)}var u,h,d}clickAttract(){const t=this.container;if(t.attract.finish||(t.attract.count||(t.attract.count=0),t.attract.count++,t.attract.count===t.particles.count&&(t.attract.finish=!0)),t.attract.clicking){const e=t.interactivity.mouse.clickPosition;if(!e)return;const n=t.retina.attractModeDistance;this.processAttract(e,n,new r(e.x,e.y,n))}else!1===t.attract.clicking&&(t.attract.particles=[])}}async function u(t){await t.addInteractor("externalAttract",(t=>new c(t)))}return e}()}));
|
|
@@ -1576,6 +1576,8 @@
|
|
|
1576
1576
|
}
|
|
1577
1577
|
init() {
|
|
1578
1578
|
const interactors = Plugins.getInteractors(this.container, true);
|
|
1579
|
+
this.externalInteractors = [];
|
|
1580
|
+
this.particleInteractors = [];
|
|
1579
1581
|
for (const interactor of interactors) {
|
|
1580
1582
|
switch (interactor.type) {
|
|
1581
1583
|
case 0:
|
|
@@ -3525,7 +3527,7 @@
|
|
|
3525
3527
|
this.fullScreen = new FullScreen;
|
|
3526
3528
|
this.detectRetina = true;
|
|
3527
3529
|
this.duration = 0;
|
|
3528
|
-
this.fpsLimit =
|
|
3530
|
+
this.fpsLimit = 120;
|
|
3529
3531
|
this.interactivity = new Interactivity;
|
|
3530
3532
|
this.manualParticles = [];
|
|
3531
3533
|
this.motion = new Motion;
|
|
@@ -4392,7 +4394,7 @@
|
|
|
4392
4394
|
class Container_Container {
|
|
4393
4395
|
constructor(id, sourceOptions, ...presets) {
|
|
4394
4396
|
this.id = id;
|
|
4395
|
-
this.fpsLimit =
|
|
4397
|
+
this.fpsLimit = 120;
|
|
4396
4398
|
this.duration = 0;
|
|
4397
4399
|
this.lifeTime = 0;
|
|
4398
4400
|
this.firstStart = true;
|
|
@@ -4565,7 +4567,7 @@
|
|
|
4565
4567
|
this.particles.clear();
|
|
4566
4568
|
this.canvas.clear();
|
|
4567
4569
|
if (this.interactivity.element instanceof HTMLElement && this.intersectionObserver) {
|
|
4568
|
-
this.intersectionObserver.
|
|
4570
|
+
this.intersectionObserver.unobserve(this.interactivity.element);
|
|
4569
4571
|
}
|
|
4570
4572
|
for (const [, plugin] of this.plugins) {
|
|
4571
4573
|
if (plugin.stop) {
|
|
@@ -4715,7 +4717,7 @@
|
|
|
4715
4717
|
this.zLayers = this.actualOptions.zLayers;
|
|
4716
4718
|
this.duration = getRangeValue(this.actualOptions.duration);
|
|
4717
4719
|
this.lifeTime = 0;
|
|
4718
|
-
this.fpsLimit = this.actualOptions.fpsLimit > 0 ? this.actualOptions.fpsLimit :
|
|
4720
|
+
this.fpsLimit = this.actualOptions.fpsLimit > 0 ? this.actualOptions.fpsLimit : 120;
|
|
4719
4721
|
const availablePlugins = Plugins.getAvailablePlugins(this);
|
|
4720
4722
|
for (const [id, plugin] of availablePlugins) {
|
|
4721
4723
|
this.plugins.set(id, plugin);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.39.
|
|
1
|
+
/*! tsParticles v1.39.3 by Matteo Bruni */
|
|
2
2
|
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var o=e();for(var n in o)("object"==typeof exports?exports:t)[n]=o[n]}}(window,(function(){return function(){"use strict";var t={d:function(e,o){for(var n in o)t.o(o,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function o(t){return"number"==typeof t?t:function(t){const e=i(t);let o=n(t);return e===o&&(o=0),Math.random()*(e-o)+o}(t)}function n(t){return"number"==typeof t?t:t.min}function i(t){return"number"==typeof t?t:t.max}function s(t,e){if(t===e||void 0===e&&"number"==typeof t)return t;const o=n(t),r=i(t);return void 0!==e?{min:Math.min(o,e),max:Math.max(r,e)}:s(o,r)}function r(t){const e=t.random,{enable:n,minimumValue:i}="boolean"==typeof e?{enable:e,minimumValue:0}:e;return o(n?s(t.value,i):t.value)}function a(t,e){const o=t.x-e.x,n=t.y-e.y;return{dx:o,dy:n,distance:Math.sqrt(o*o+n*n)}}function c(t,e,o,n){return b.create(t.x*(o-n)/(o+n)+2*e.x*n/(o+n),t.y)}function u(t,e,o,n,i,s){const r={bounced:!1};return e.min>=n.min&&e.min<=n.max&&e.max>=n.min&&e.max<=n.max&&(t.max>=o.min&&t.max<=(o.max+o.min)/2&&i>0||t.min<=o.max&&t.min>(o.max+o.min)/2&&i<0)&&(r.velocity=i*-s,r.bounced=!0),r}function h(t,e){return t===e||e instanceof Array&&e.indexOf(t)>-1}function y(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function l(t,e){const o=t.selectors;if(o instanceof Array)for(const n of o)e(n,t);else e(o,t)}function f(t,e){const{x:o,y:n}=t.velocity.sub(e.velocity),[i,s]=[t.position,e.position],{dx:r,dy:u}=a(s,i);if(o*r+n*u>=0){const o=-Math.atan2(u,r),n=t.mass,i=e.mass,s=t.velocity.rotate(o),a=e.velocity.rotate(o),h=c(s,a,n,i),y=c(a,s,n,i),l=h.rotate(-o),f=y.rotate(-o);t.velocity.x=l.x*t.factor.x,t.velocity.y=l.y*t.factor.y,e.velocity.x=f.x*e.factor.x,e.velocity.y=f.y*e.factor.y}}function d(t,e){const o=y(t.getPosition(),t.getRadius()),n=u({min:o.left,max:o.right},{min:o.top,max:o.bottom},{min:e.left,max:e.right},{min:e.top,max:e.bottom},t.velocity.x,r(t.options.bounce.horizontal));n.bounced&&(void 0!==n.velocity&&(t.velocity.x=n.velocity),void 0!==n.position&&(t.position.x=n.position));const i=u({min:o.top,max:o.bottom},{min:o.left,max:o.right},{min:e.top,max:e.bottom},{min:e.left,max:e.right},t.velocity.y,r(t.options.bounce.vertical));i.bounced&&(void 0!==i.velocity&&(t.velocity.y=i.velocity),void 0!==i.position&&(t.position.y=i.position))}t.r(e),t.d(e,{loadExternalBounceInteraction:function(){return M}});class m{constructor(t,e){this.position={x:t,y:e}}}class x extends m{constructor(t,e,o){super(t,e),this.radius=o}contains(t){return e=t,o=this.position,a(e,o).distance<=this.radius;var e,o}intersects(t){const e=t,o=t,n=this.position,i=t.position,s=Math.abs(i.x-n.x),r=Math.abs(i.y-n.y),a=this.radius;if(void 0!==o.radius){return a+o.radius>Math.sqrt(s*s+r+r)}if(void 0!==e.size){const t=e.size.width,o=e.size.height,n=Math.pow(s-t,2)+Math.pow(r-o,2);return!(s>a+t||r>a+o)&&(s<=t||r<=o||n<=a*a)}return!1}}class p{}p.generatedAttribute="generated",p.randomColorValue="random",p.midColorValue="mid",p.touchEndEvent="touchend",p.mouseDownEvent="mousedown",p.mouseUpEvent="mouseup",p.mouseMoveEvent="mousemove",p.touchStartEvent="touchstart",p.touchMoveEvent="touchmove",p.mouseLeaveEvent="mouseleave",p.mouseOutEvent="mouseout",p.touchCancelEvent="touchcancel",p.resizeEvent="resize",p.visibilityChangeEvent="visibilitychange",p.noPolygonDataLoaded="No polygon data loaded.",p.noPolygonFound="No polygon found, you need to specify SVG url in config.";new Map,new Map,new Map,new Map,new Map,new Map,new Map;class v extends m{constructor(t,e,o,n){super(t,e),this.size={height:n,width:o}}contains(t){const e=this.size.width,o=this.size.height,n=this.position;return t.x>=n.x&&t.x<=n.x+e&&t.y>=n.y&&t.y<=n.y+o}intersects(t){const e=t,o=t,n=this.size.width,i=this.size.height,s=this.position,r=t.position;if(void 0!==o.radius)return o.intersects(this);if(void 0!==e.size){const t=e.size,o=t.width,a=t.height;return r.x<s.x+n&&r.x+o>s.x&&r.y<s.y+i&&r.y+a>s.y}return!1}}class b{constructor(t,e){let o,n;if(void 0===e){if("number"==typeof t)throw new Error("tsParticles - Vector not initialized correctly");const e=t;[o,n]=[e.x,e.y]}else[o,n]=[t,e];this.x=o,this.y=n}static clone(t){return b.create(t.x,t.y)}static create(t,e){return new b(t,e)}static get origin(){return b.create(0,0)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.updateFromAngle(t,this.length)}get length(){return Math.sqrt(this.x**2+this.y**2)}set length(t){this.updateFromAngle(this.angle,t)}add(t){return b.create(this.x+t.x,this.y+t.y)}addTo(t){this.x+=t.x,this.y+=t.y}sub(t){return b.create(this.x-t.x,this.y-t.y)}subFrom(t){this.x-=t.x,this.y-=t.y}mult(t){return b.create(this.x*t,this.y*t)}multTo(t){this.x*=t,this.y*=t}div(t){return b.create(this.x/t,this.y/t)}divTo(t){this.x/=t,this.y/=t}distanceTo(t){return this.sub(t).length}getLengthSq(){return this.x**2+this.y**2}distanceToSq(t){return this.sub(t).getLengthSq()}manhattanDistanceTo(t){return Math.abs(t.x-this.x)+Math.abs(t.y-this.y)}copy(){return b.clone(this)}setTo(t){this.x=t.x,this.y=t.y}rotate(t){return b.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t))}updateFromAngle(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}new WeakSet;class g extends class{constructor(t){this.container=t,this.type=0}}{constructor(t){super(t)}isEnabled(){const t=this.container,e=t.actualOptions,o=t.interactivity.mouse,n=e.interactivity.events,i=n.onDiv;return o.position&&n.onHover.enable&&h("bounce",n.onHover.mode)||function(t,e){return e instanceof Array?!!e.find((e=>e.enable&&h(t,e.mode))):h(t,e.mode)}("bounce",i)}interact(){const t=this.container,e=t.actualOptions.interactivity.events,o=t.interactivity.status===p.mouseMoveEvent,n=e.onHover.enable,i=e.onHover.mode,s=e.onDiv;o&&n&&h("bounce",i)?this.processMouseBounce():function(t,e,o){if(e instanceof Array)for(const n of e){const e=n.mode;n.enable&&h(t,e)&&l(n,o)}else{const n=e.mode;e.enable&&h(t,n)&&l(e,o)}}("bounce",s,((t,e)=>this.singleSelectorBounce(t,e)))}reset(){}processMouseBounce(){const t=this.container,e=10*t.retina.pixelRatio,o=t.interactivity.mouse.position,n=t.retina.bounceModeDistance;o&&this.processBounce(o,n,new x(o.x,o.y,n+e))}singleSelectorBounce(t,e){const o=this.container,n=document.querySelectorAll(t);n.length&&n.forEach((t=>{const n=t,i=o.retina.pixelRatio,s={x:(n.offsetLeft+n.offsetWidth/2)*i,y:(n.offsetTop+n.offsetHeight/2)*i},r=n.offsetWidth/2*i,a=10*i,c="circle"===e.type?new x(s.x,s.y,r+a):new v(n.offsetLeft*i-a,n.offsetTop*i-a,n.offsetWidth*i+2*a,n.offsetHeight*i+2*a);this.processBounce(s,r,c)}))}processBounce(t,e,o){const n=this.container.particles.quadTree.query(o);for(const s of n)o instanceof x?f({position:(i=s).getPosition(),radius:i.getRadius(),mass:i.getMass(),velocity:i.velocity,factor:b.create(r(i.options.bounce.horizontal),r(i.options.bounce.vertical))},{position:t,radius:e,mass:e**2*Math.PI/2,velocity:b.origin,factor:b.origin}):o instanceof v&&d(s,y(t,e));var i}}async function M(t){await t.addInteractor("externalBounce",(t=>new g(t)))}return e}()}));
|
|
@@ -1576,6 +1576,8 @@
|
|
|
1576
1576
|
}
|
|
1577
1577
|
init() {
|
|
1578
1578
|
const interactors = Plugins.getInteractors(this.container, true);
|
|
1579
|
+
this.externalInteractors = [];
|
|
1580
|
+
this.particleInteractors = [];
|
|
1579
1581
|
for (const interactor of interactors) {
|
|
1580
1582
|
switch (interactor.type) {
|
|
1581
1583
|
case 0:
|
|
@@ -3434,7 +3436,7 @@
|
|
|
3434
3436
|
this.fullScreen = new FullScreen;
|
|
3435
3437
|
this.detectRetina = true;
|
|
3436
3438
|
this.duration = 0;
|
|
3437
|
-
this.fpsLimit =
|
|
3439
|
+
this.fpsLimit = 120;
|
|
3438
3440
|
this.interactivity = new Interactivity;
|
|
3439
3441
|
this.manualParticles = [];
|
|
3440
3442
|
this.motion = new Motion;
|
|
@@ -4301,7 +4303,7 @@
|
|
|
4301
4303
|
class Container_Container {
|
|
4302
4304
|
constructor(id, sourceOptions, ...presets) {
|
|
4303
4305
|
this.id = id;
|
|
4304
|
-
this.fpsLimit =
|
|
4306
|
+
this.fpsLimit = 120;
|
|
4305
4307
|
this.duration = 0;
|
|
4306
4308
|
this.lifeTime = 0;
|
|
4307
4309
|
this.firstStart = true;
|
|
@@ -4474,7 +4476,7 @@
|
|
|
4474
4476
|
this.particles.clear();
|
|
4475
4477
|
this.canvas.clear();
|
|
4476
4478
|
if (this.interactivity.element instanceof HTMLElement && this.intersectionObserver) {
|
|
4477
|
-
this.intersectionObserver.
|
|
4479
|
+
this.intersectionObserver.unobserve(this.interactivity.element);
|
|
4478
4480
|
}
|
|
4479
4481
|
for (const [, plugin] of this.plugins) {
|
|
4480
4482
|
if (plugin.stop) {
|
|
@@ -4624,7 +4626,7 @@
|
|
|
4624
4626
|
this.zLayers = this.actualOptions.zLayers;
|
|
4625
4627
|
this.duration = getRangeValue(this.actualOptions.duration);
|
|
4626
4628
|
this.lifeTime = 0;
|
|
4627
|
-
this.fpsLimit = this.actualOptions.fpsLimit > 0 ? this.actualOptions.fpsLimit :
|
|
4629
|
+
this.fpsLimit = this.actualOptions.fpsLimit > 0 ? this.actualOptions.fpsLimit : 120;
|
|
4628
4630
|
const availablePlugins = Plugins.getAvailablePlugins(this);
|
|
4629
4631
|
for (const [id, plugin] of availablePlugins) {
|
|
4630
4632
|
this.plugins.set(id, plugin);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.39.
|
|
1
|
+
/*! tsParticles v1.39.3 by Matteo Bruni */
|
|
2
2
|
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}}(window,(function(){return function(){"use strict";var e={d:function(t,o){for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function o(e,t,o){return Math.min(Math.max(e,t),o)}function n(e,t,o,n){return Math.floor((e*o+t*n)/(o+n))}function i(e){const t=s(e);let o=r(e);return t===o&&(o=0),Math.random()*(t-o)+o}function r(e){return"number"==typeof e?e:e.min}function s(e){return"number"==typeof e?e:e.max}function a(e,t){if(e===t||void 0===t&&"number"==typeof e)return e;const o=r(e),n=s(e);return void 0!==t?{min:Math.min(o,t),max:Math.max(n,t)}:a(o,n)}function l(e,t){return function(e,t){const o=e.x-t.x,n=e.y-t.y;return{dx:o,dy:n,distance:Math.sqrt(o*o+n*n)}}(e,t).distance}function u(e,t){if(t instanceof Array){for(const o of t)if(e.matches(o))return!0;return!1}return e.matches(t)}function b(e,t){return e===t||t instanceof Array&&t.indexOf(e)>-1}function c(e,t,o=!0){return e[void 0!==t&&o?t%e.length:function(e){return Math.floor(Math.random()*e.length)}(e)]}function d(e,t){const o=e.selectors;if(o instanceof Array)for(const n of o)t(n,e);else t(o,e)}function f(e,t){if(t&&e)return e instanceof Array?e.find((e=>u(t,e.selectors))):u(t,e.selectors)?e:void 0}function v(e,t,o){let n=o;return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function h(e){if(e.startsWith("rgb")){const t=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([\d.]+)\s*)?\)/i.exec(e);return t?{a:t.length>4?parseFloat(t[5]):1,b:parseInt(t[3],10),g:parseInt(t[2],10),r:parseInt(t[1],10)}:void 0}if(e.startsWith("hsl")){const t=/hsla?\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i.exec(e);return t?function(e){const t=g(e);return{a:e.a,b:t.b,g:t.g,r:t.r}}({a:t.length>4?parseFloat(t[5]):1,h:parseInt(t[1],10),l:parseInt(t[3],10),s:parseInt(t[2],10)}):void 0}if(e.startsWith("hsv")){const t=/hsva?\(\s*(\d+)°\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i.exec(e);return t?function(e){const t=m(e);return{a:e.a,b:t.b,g:t.g,r:t.r}}({a:t.length>4?parseFloat(t[5]):1,h:parseInt(t[1],10),s:parseInt(t[2],10),v:parseInt(t[3],10)}):void 0}{const t=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,o=e.replace(t,((e,t,o,n,i)=>t+t+o+o+n+n+(void 0!==i?i+i:""))),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(o);return n?{a:void 0!==n[4]?parseInt(n[4],16)/255:1,b:parseInt(n[3],16),g:parseInt(n[2],16),r:parseInt(n[1],16)}:void 0}}function p(e,t,o=!0){var n,i,r;if(void 0===e)return;const s="string"==typeof e?{value:e}:e;let a;if("string"==typeof s.value)a=s.value===O.randomColorValue?M():function(e){return h(e)}(s.value);else if(s.value instanceof Array){a=p({value:c(s.value,t,o)})}else{const e=s.value,t=null!==(n=e.rgb)&&void 0!==n?n:s.value;if(void 0!==t.r)a=t;else{const t=null!==(i=e.hsl)&&void 0!==i?i:s.value;if(void 0!==t.h&&void 0!==t.l)a=g(t);else{const t=null!==(r=e.hsv)&&void 0!==r?r:s.value;void 0!==t.h&&void 0!==t.v&&(a=m(t))}}}return a}function y(e){const t=e.r/255,o=e.g/255,n=e.b/255,i=Math.max(t,o,n),r=Math.min(t,o,n),s={h:0,l:(i+r)/2,s:0};return i!=r&&(s.s=s.l<.5?(i-r)/(i+r):(i-r)/(2-i-r),s.h=t===i?(o-n)/(i-r):s.h=o===i?2+(n-t)/(i-r):4+(t-o)/(i-r)),s.l*=100,s.s*=100,s.h*=60,s.h<0&&(s.h+=360),s}function g(e){const t={b:0,g:0,r:0},o={h:e.h/360,l:e.l/100,s:e.s/100};if(0===o.s)t.b=o.l,t.g=o.l,t.r=o.l;else{const e=o.l<.5?o.l*(1+o.s):o.l+o.s-o.l*o.s,n=2*o.l-e;t.r=v(n,e,o.h+1/3),t.g=v(n,e,o.h),t.b=v(n,e,o.h-1/3)}return t.r=Math.floor(255*t.r),t.g=Math.floor(255*t.g),t.b=Math.floor(255*t.b),t}function m(e){const t={b:0,g:0,r:0},o=e.h/60,n=e.s/100,i=e.v/100,r=i*n,s=r*(1-Math.abs(o%2-1));let a;if(o>=0&&o<=1?a={r:r,g:s,b:0}:o>1&&o<=2?a={r:s,g:r,b:0}:o>2&&o<=3?a={r:0,g:r,b:s}:o>3&&o<=4?a={r:0,g:s,b:r}:o>4&&o<=5?a={r:s,g:0,b:r}:o>5&&o<=6&&(a={r:r,g:0,b:s}),a){const e=i-r;t.r=Math.floor(255*(a.r+e)),t.g=Math.floor(255*(a.g+e)),t.b=Math.floor(255*(a.b+e))}return t}function M(e){const t=null!=e?e:0;return{b:Math.floor(i(a(t,256))),g:Math.floor(i(a(t,256))),r:Math.floor(i(a(t,256)))}}function x(e,t,o,i){let r=e,s=t;return void 0===r.r&&(r=g(e)),void 0===s.r&&(s=g(t)),{b:n(r.b,s.b,o,i),g:n(r.g,s.g,o,i),r:n(r.r,s.r,o,i)}}e.r(t),e.d(t,{loadExternalBubbleInteraction:function(){return S}});class z{constructor(e,t){this.position={x:e,y:t}}}class w extends z{constructor(e,t,o){super(e,t),this.radius=o}contains(e){return l(e,this.position)<=this.radius}intersects(e){const t=e,o=e,n=this.position,i=e.position,r=Math.abs(i.x-n.x),s=Math.abs(i.y-n.y),a=this.radius;if(void 0!==o.radius){return a+o.radius>Math.sqrt(r*r+s+s)}if(void 0!==t.size){const e=t.size.width,o=t.size.height,n=Math.pow(r-e,2)+Math.pow(s-o,2);return!(r>a+e||s>a+o)&&(r<=e||s<=o||n<=a*a)}return!1}}class O{}O.generatedAttribute="generated",O.randomColorValue="random",O.midColorValue="mid",O.touchEndEvent="touchend",O.mouseDownEvent="mousedown",O.mouseUpEvent="mouseup",O.mouseMoveEvent="mousemove",O.touchStartEvent="touchstart",O.touchMoveEvent="touchmove",O.mouseLeaveEvent="mouseleave",O.mouseOutEvent="mouseout",O.touchCancelEvent="touchcancel",O.resizeEvent="resize",O.visibilityChangeEvent="visibilitychange",O.noPolygonDataLoaded="No polygon data loaded.",O.noPolygonFound="No polygon found, you need to specify SVG url in config.";new Map,new Map,new Map,new Map,new Map,new Map,new Map;class E extends z{constructor(e,t,o,n){super(e,t),this.size={height:n,width:o}}contains(e){const t=this.size.width,o=this.size.height,n=this.position;return e.x>=n.x&&e.x<=n.x+t&&e.y>=n.y&&e.y<=n.y+o}intersects(e){const t=e,o=e,n=this.size.width,i=this.size.height,r=this.position,s=e.position;if(void 0!==o.radius)return o.intersects(this);if(void 0!==t.size){const e=t.size,o=e.width,a=e.height;return s.x<r.x+n&&s.x+o>r.x&&s.y<r.y+i&&s.y+a>r.y}return!1}}new WeakSet;function C(e,t,n,i){if(t>=n){return o(e+(t-n)*i,e,t)}if(t<n){return o(e-(n-t)*i,t,e)}}class B extends class{constructor(e){this.container=e,this.type=0}}{constructor(e){super(e)}isEnabled(){const e=this.container,t=e.actualOptions,o=e.interactivity.mouse,n=t.interactivity.events,i=function(e,t){return t instanceof Array?!!t.find((t=>t.enable&&b(e,t.mode))):b(e,t.mode)}("bubble",n.onDiv);if(!(i||n.onHover.enable&&o.position||n.onClick.enable&&o.clickPosition))return!1;const r=n.onHover.mode,s=n.onClick.mode;return b("bubble",r)||b("bubble",s)||i}reset(e,t){e.bubble.inRange&&!t||(delete e.bubble.div,delete e.bubble.opacity,delete e.bubble.radius,delete e.bubble.color)}interact(){const e=this.container.actualOptions.interactivity.events,t=e.onHover,o=e.onClick,n=t.enable,i=t.mode,r=o.enable,s=o.mode,a=e.onDiv;n&&b("bubble",i)?this.hoverBubble():r&&b("bubble",s)?this.clickBubble():function(e,t,o){if(t instanceof Array)for(const n of t){const t=n.mode;n.enable&&b(e,t)&&d(n,o)}else{const n=t.mode;t.enable&&b(e,n)&&d(t,o)}}("bubble",a,((e,t)=>this.singleSelectorHover(e,t)))}singleSelectorHover(e,t){const o=this.container,n=document.querySelectorAll(e);n.length&&n.forEach((e=>{const n=e,i=o.retina.pixelRatio,r={x:(n.offsetLeft+n.offsetWidth/2)*i,y:(n.offsetTop+n.offsetHeight/2)*i},s=n.offsetWidth/2*i,a="circle"===t.type?new w(r.x,r.y,s):new E(n.offsetLeft*i,n.offsetTop*i,n.offsetWidth*i,n.offsetHeight*i),l=o.particles.quadTree.query(a);for(const e of l){if(!a.contains(e.getPosition()))continue;e.bubble.inRange=!0;const t=f(o.actualOptions.interactivity.modes.bubble.divs,n);e.bubble.div&&e.bubble.div===n||(this.reset(e,!0),e.bubble.div=n),this.hoverBubbleSize(e,1,t),this.hoverBubbleOpacity(e,1,t),this.hoverBubbleColor(e,1,t)}}))}process(e,t,o,n){const i=this.container,r=n.bubbleObj.optValue;if(void 0===r)return;const s=i.actualOptions.interactivity.modes.bubble.duration,a=i.retina.bubbleModeDistance,l=n.particlesObj.optValue,u=n.bubbleObj.value,b=n.particlesObj.value||0,c=n.type;if(r!==l)if(i.bubble.durationEnd)u&&("size"===c&&delete e.bubble.radius,"opacity"===c&&delete e.bubble.opacity);else if(t<=a){if((null!=u?u:b)!==r){const t=b-o*(b-r)/s;"size"===c&&(e.bubble.radius=t),"opacity"===c&&(e.bubble.opacity=t)}}else"size"===c&&delete e.bubble.radius,"opacity"===c&&delete e.bubble.opacity}clickBubble(){var e,t;const o=this.container,n=o.actualOptions,i=o.interactivity.mouse.clickPosition;if(!i)return;const r=o.retina.bubbleModeDistance,a=o.particles.quadTree.queryCircle(i,r);for(const r of a){if(!o.bubble.clicking)continue;r.bubble.inRange=!o.bubble.durationEnd;const a=l(r.getPosition(),i),u=((new Date).getTime()-(o.interactivity.mouse.clickTime||0))/1e3;u>n.interactivity.modes.bubble.duration&&(o.bubble.durationEnd=!0),u>2*n.interactivity.modes.bubble.duration&&(o.bubble.clicking=!1,o.bubble.durationEnd=!1);const b={bubbleObj:{optValue:o.retina.bubbleModeSize,value:r.bubble.radius},particlesObj:{optValue:s(r.options.size.value)*o.retina.pixelRatio,value:r.size.value},type:"size"};this.process(r,a,u,b);const c={bubbleObj:{optValue:n.interactivity.modes.bubble.opacity,value:r.bubble.opacity},particlesObj:{optValue:s(r.options.opacity.value),value:null!==(t=null===(e=r.opacity)||void 0===e?void 0:e.value)&&void 0!==t?t:1},type:"opacity"};this.process(r,a,u,c),o.bubble.durationEnd?delete r.bubble.color:a<=o.retina.bubbleModeDistance?this.hoverBubbleColor(r,a):delete r.bubble.color}}hoverBubble(){const e=this.container,t=e.interactivity.mouse.position;if(void 0===t)return;const o=e.retina.bubbleModeDistance,n=e.particles.quadTree.queryCircle(t,o);for(const i of n){i.bubble.inRange=!0;const n=l(i.getPosition(),t),r=1-n/o;n<=o?r>=0&&e.interactivity.status===O.mouseMoveEvent&&(this.hoverBubbleSize(i,r),this.hoverBubbleOpacity(i,r),this.hoverBubbleColor(i,r)):this.reset(i),e.interactivity.status===O.mouseLeaveEvent&&this.reset(i)}}hoverBubbleSize(e,t,o){const n=this.container,i=(null==o?void 0:o.size)?o.size*n.retina.pixelRatio:n.retina.bubbleModeSize;if(void 0===i)return;const r=s(e.options.size.value)*n.retina.pixelRatio,a=C(e.size.value,i,r,t);void 0!==a&&(e.bubble.radius=a)}hoverBubbleOpacity(e,t,o){var n,i,r;const a=this.container.actualOptions,l=null!==(n=null==o?void 0:o.opacity)&&void 0!==n?n:a.interactivity.modes.bubble.opacity;if(!l)return;const u=e.options.opacity.value,b=C(null!==(r=null===(i=e.opacity)||void 0===i?void 0:i.value)&&void 0!==r?r:1,l,s(u),t);void 0!==b&&(e.bubble.opacity=b)}hoverBubbleColor(e,t,o){const n=this.container.actualOptions,i=null!=o?o:n.interactivity.modes.bubble;if(!e.bubble.finalColor){const t=i.color;if(!t)return;const o=t instanceof Array?c(t):t;e.bubble.finalColor=function(e,t,o=!0){const n=p(e,t,o);return void 0!==n?y(n):void 0}(o)}if(e.bubble.finalColor)if(i.mix){e.bubble.color=void 0;const o=e.getFillColor();e.bubble.color=o?y(x(o,e.bubble.finalColor,1-t,t)):e.bubble.finalColor}else e.bubble.color=e.bubble.finalColor}}async function S(e){await e.addInteractor("externalBubble",(e=>new B(e)))}return t}()}));
|
|
@@ -1568,6 +1568,8 @@
|
|
|
1568
1568
|
}
|
|
1569
1569
|
init() {
|
|
1570
1570
|
const interactors = Plugins.getInteractors(this.container, true);
|
|
1571
|
+
this.externalInteractors = [];
|
|
1572
|
+
this.particleInteractors = [];
|
|
1571
1573
|
for (const interactor of interactors) {
|
|
1572
1574
|
switch (interactor.type) {
|
|
1573
1575
|
case 0:
|
|
@@ -3394,7 +3396,7 @@
|
|
|
3394
3396
|
this.fullScreen = new FullScreen;
|
|
3395
3397
|
this.detectRetina = true;
|
|
3396
3398
|
this.duration = 0;
|
|
3397
|
-
this.fpsLimit =
|
|
3399
|
+
this.fpsLimit = 120;
|
|
3398
3400
|
this.interactivity = new Interactivity;
|
|
3399
3401
|
this.manualParticles = [];
|
|
3400
3402
|
this.motion = new Motion;
|
|
@@ -4261,7 +4263,7 @@
|
|
|
4261
4263
|
class Container_Container {
|
|
4262
4264
|
constructor(id, sourceOptions, ...presets) {
|
|
4263
4265
|
this.id = id;
|
|
4264
|
-
this.fpsLimit =
|
|
4266
|
+
this.fpsLimit = 120;
|
|
4265
4267
|
this.duration = 0;
|
|
4266
4268
|
this.lifeTime = 0;
|
|
4267
4269
|
this.firstStart = true;
|
|
@@ -4434,7 +4436,7 @@
|
|
|
4434
4436
|
this.particles.clear();
|
|
4435
4437
|
this.canvas.clear();
|
|
4436
4438
|
if (this.interactivity.element instanceof HTMLElement && this.intersectionObserver) {
|
|
4437
|
-
this.intersectionObserver.
|
|
4439
|
+
this.intersectionObserver.unobserve(this.interactivity.element);
|
|
4438
4440
|
}
|
|
4439
4441
|
for (const [, plugin] of this.plugins) {
|
|
4440
4442
|
if (plugin.stop) {
|
|
@@ -4584,7 +4586,7 @@
|
|
|
4584
4586
|
this.zLayers = this.actualOptions.zLayers;
|
|
4585
4587
|
this.duration = getRangeValue(this.actualOptions.duration);
|
|
4586
4588
|
this.lifeTime = 0;
|
|
4587
|
-
this.fpsLimit = this.actualOptions.fpsLimit > 0 ? this.actualOptions.fpsLimit :
|
|
4589
|
+
this.fpsLimit = this.actualOptions.fpsLimit > 0 ? this.actualOptions.fpsLimit : 120;
|
|
4588
4590
|
const availablePlugins = Plugins.getAvailablePlugins(this);
|
|
4589
4591
|
for (const [id, plugin] of availablePlugins) {
|
|
4590
4592
|
this.plugins.set(id, plugin);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.39.
|
|
1
|
+
/*! tsParticles v1.39.3 by Matteo Bruni */
|
|
2
2
|
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(window,(function(){return function(){"use strict";var e={d:function(t,n){for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function n(e,t){return e===t||t instanceof Array&&t.indexOf(e)>-1}e.r(t),e.d(t,{loadExternalConnectInteraction:function(){return a}});class o{}o.generatedAttribute="generated",o.randomColorValue="random",o.midColorValue="mid",o.touchEndEvent="touchend",o.mouseDownEvent="mousedown",o.mouseUpEvent="mouseup",o.mouseMoveEvent="mousemove",o.touchStartEvent="touchstart",o.touchMoveEvent="touchmove",o.mouseLeaveEvent="mouseleave",o.mouseOutEvent="mouseout",o.touchCancelEvent="touchcancel",o.resizeEvent="resize",o.visibilityChangeEvent="visibilitychange",o.noPolygonDataLoaded="No polygon data loaded.",o.noPolygonFound="No polygon found, you need to specify SVG url in config.";new Map,new Map,new Map,new Map,new Map,new Map,new Map;new WeakSet;class i extends class{constructor(e){this.container=e,this.type=0}}{constructor(e){super(e)}isEnabled(){const e=this.container,t=e.interactivity.mouse,o=e.actualOptions.interactivity.events;return!(!o.onHover.enable||!t.position)&&n("connect",o.onHover.mode)}reset(){}interact(){const e=this.container;if(e.actualOptions.interactivity.events.onHover.enable&&"mousemove"===e.interactivity.status){const t=e.interactivity.mouse.position;if(!t)return;const n=Math.abs(e.retina.connectModeRadius),o=e.particles.quadTree.queryCircle(t,n);let i=0;for(const t of o){const n=t.getPosition();for(const a of o.slice(i+1)){const o=a.getPosition(),i=Math.abs(e.retina.connectModeDistance),r=Math.abs(n.x-o.x),c=Math.abs(n.y-o.y);r<i&&c<i&&e.canvas.drawConnectLine(t,a)}++i}}}}async function a(e){await e.addInteractor("externalConnect",(e=>new i(e)))}return t}()}));
|
|
@@ -1568,6 +1568,8 @@
|
|
|
1568
1568
|
}
|
|
1569
1569
|
init() {
|
|
1570
1570
|
const interactors = Plugins.getInteractors(this.container, true);
|
|
1571
|
+
this.externalInteractors = [];
|
|
1572
|
+
this.particleInteractors = [];
|
|
1571
1573
|
for (const interactor of interactors) {
|
|
1572
1574
|
switch (interactor.type) {
|
|
1573
1575
|
case 0:
|
|
@@ -3394,7 +3396,7 @@
|
|
|
3394
3396
|
this.fullScreen = new FullScreen;
|
|
3395
3397
|
this.detectRetina = true;
|
|
3396
3398
|
this.duration = 0;
|
|
3397
|
-
this.fpsLimit =
|
|
3399
|
+
this.fpsLimit = 120;
|
|
3398
3400
|
this.interactivity = new Interactivity;
|
|
3399
3401
|
this.manualParticles = [];
|
|
3400
3402
|
this.motion = new Motion;
|
|
@@ -4261,7 +4263,7 @@
|
|
|
4261
4263
|
class Container_Container {
|
|
4262
4264
|
constructor(id, sourceOptions, ...presets) {
|
|
4263
4265
|
this.id = id;
|
|
4264
|
-
this.fpsLimit =
|
|
4266
|
+
this.fpsLimit = 120;
|
|
4265
4267
|
this.duration = 0;
|
|
4266
4268
|
this.lifeTime = 0;
|
|
4267
4269
|
this.firstStart = true;
|
|
@@ -4434,7 +4436,7 @@
|
|
|
4434
4436
|
this.particles.clear();
|
|
4435
4437
|
this.canvas.clear();
|
|
4436
4438
|
if (this.interactivity.element instanceof HTMLElement && this.intersectionObserver) {
|
|
4437
|
-
this.intersectionObserver.
|
|
4439
|
+
this.intersectionObserver.unobserve(this.interactivity.element);
|
|
4438
4440
|
}
|
|
4439
4441
|
for (const [, plugin] of this.plugins) {
|
|
4440
4442
|
if (plugin.stop) {
|
|
@@ -4584,7 +4586,7 @@
|
|
|
4584
4586
|
this.zLayers = this.actualOptions.zLayers;
|
|
4585
4587
|
this.duration = getRangeValue(this.actualOptions.duration);
|
|
4586
4588
|
this.lifeTime = 0;
|
|
4587
|
-
this.fpsLimit = this.actualOptions.fpsLimit > 0 ? this.actualOptions.fpsLimit :
|
|
4589
|
+
this.fpsLimit = this.actualOptions.fpsLimit > 0 ? this.actualOptions.fpsLimit : 120;
|
|
4588
4590
|
const availablePlugins = Plugins.getAvailablePlugins(this);
|
|
4589
4591
|
for (const [id, plugin] of availablePlugins) {
|
|
4590
4592
|
this.plugins.set(id, plugin);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.39.
|
|
1
|
+
/*! tsParticles v1.39.3 by Matteo Bruni */
|
|
2
2
|
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(window,(function(){return function(){"use strict";var t={d:function(e,n){for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t,e,n,o){return Math.floor((t*n+e*o)/(n+o))}function o(t){const e=a(t);let n=r(t);return e===n&&(n=0),Math.random()*(e-n)+n}function r(t){return"number"==typeof t?t:t.min}function a(t){return"number"==typeof t?t:t.max}function i(t,e){if(t===e||void 0===e&&"number"==typeof t)return t;const n=r(t),o=a(t);return void 0!==e?{min:Math.min(n,e),max:Math.max(o,e)}:i(n,o)}function s(t,e){return function(t,e){const n=t.x-e.x,o=t.y-e.y;return{dx:n,dy:o,distance:Math.sqrt(n*n+o*o)}}(t,e).distance}function l(t,e){return t===e||e instanceof Array&&e.indexOf(t)>-1}function u(t,e,n=!0){return t[void 0!==e&&n?e%t.length:function(t){return Math.floor(Math.random()*t.length)}(t)]}function c(t,e,n){let o=n;return o<0&&(o+=1),o>1&&(o-=1),o<1/6?t+6*(e-t)*o:o<.5?e:o<2/3?t+(e-t)*(2/3-o)*6:t}function d(t){if(t.startsWith("rgb")){const e=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([\d.]+)\s*)?\)/i.exec(t);return e?{a:e.length>4?parseFloat(e[5]):1,b:parseInt(e[3],10),g:parseInt(e[2],10),r:parseInt(e[1],10)}:void 0}if(t.startsWith("hsl")){const e=/hsla?\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i.exec(t);return e?function(t){const e=v(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?parseFloat(e[5]):1,h:parseInt(e[1],10),l:parseInt(e[3],10),s:parseInt(e[2],10)}):void 0}if(t.startsWith("hsv")){const e=/hsva?\(\s*(\d+)°\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i.exec(t);return e?function(t){const e=g(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?parseFloat(e[5]):1,h:parseInt(e[1],10),s:parseInt(e[2],10),v:parseInt(e[3],10)}):void 0}{const e=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,n=t.replace(e,((t,e,n,o,r)=>e+e+n+n+o+o+(void 0!==r?r+r:""))),o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(n);return o?{a:void 0!==o[4]?parseInt(o[4],16)/255:1,b:parseInt(o[3],16),g:parseInt(o[2],16),r:parseInt(o[1],16)}:void 0}}function f(t,e,n=!0){var o,r,a;if(void 0===t)return;const i="string"==typeof t?{value:t}:t;let s;if("string"==typeof i.value)s=i.value===m.randomColorValue?p():function(t){return d(t)}(i.value);else if(i.value instanceof Array){s=f({value:u(i.value,e,n)})}else{const t=i.value,e=null!==(o=t.rgb)&&void 0!==o?o:i.value;if(void 0!==e.r)s=e;else{const e=null!==(r=t.hsl)&&void 0!==r?r:i.value;if(void 0!==e.h&&void 0!==e.l)s=v(e);else{const e=null!==(a=t.hsv)&&void 0!==a?a:i.value;void 0!==e.h&&void 0!==e.v&&(s=g(e))}}}return s}function v(t){const e={b:0,g:0,r:0},n={h:t.h/360,l:t.l/100,s:t.s/100};if(0===n.s)e.b=n.l,e.g=n.l,e.r=n.l;else{const t=n.l<.5?n.l*(1+n.s):n.l+n.s-n.l*n.s,o=2*n.l-t;e.r=c(o,t,n.h+1/3),e.g=c(o,t,n.h),e.b=c(o,t,n.h-1/3)}return e.r=Math.floor(255*e.r),e.g=Math.floor(255*e.g),e.b=Math.floor(255*e.b),e}function g(t){const e={b:0,g:0,r:0},n=t.h/60,o=t.s/100,r=t.v/100,a=r*o,i=a*(1-Math.abs(n%2-1));let s;if(n>=0&&n<=1?s={r:a,g:i,b:0}:n>1&&n<=2?s={r:i,g:a,b:0}:n>2&&n<=3?s={r:0,g:a,b:i}:n>3&&n<=4?s={r:0,g:i,b:a}:n>4&&n<=5?s={r:i,g:0,b:a}:n>5&&n<=6&&(s={r:a,g:0,b:i}),s){const t=r-a;e.r=Math.floor(255*(s.r+t)),e.g=Math.floor(255*(s.g+t)),e.b=Math.floor(255*(s.b+t))}return e}function p(t){const e=null!=t?t:0;return{b:Math.floor(o(i(e,256))),g:Math.floor(o(i(e,256))),r:Math.floor(o(i(e,256)))}}function b(t,e,o){var r,a;if(o===m.randomColorValue)return p();if("mid"!==o)return o;{const o=null!==(r=t.getFillColor())&&void 0!==r?r:t.getStrokeColor(),i=null!==(a=null==e?void 0:e.getFillColor())&&void 0!==a?a:null==e?void 0:e.getStrokeColor();if(o&&i&&e)return function(t,e,o,r){let a=t,i=e;return void 0===a.r&&(a=v(t)),void 0===i.r&&(i=v(e)),{b:n(a.b,i.b,o,r),g:n(a.g,i.g,o,r),r:n(a.r,i.r,o,r)}}(o,i,t.getRadius(),e.getRadius());{const t=null!=o?o:i;if(t)return v(t)}}}function h(t,e,n){const o="string"==typeof t?t:t.value;return o===m.randomColorValue?n?f({value:o}):e?m.randomColorValue:m.midColorValue:f({value:o})}t.r(e),t.d(e,{loadExternalGrabInteraction:function(){return M}});class m{}m.generatedAttribute="generated",m.randomColorValue="random",m.midColorValue="mid",m.touchEndEvent="touchend",m.mouseDownEvent="mousedown",m.mouseUpEvent="mouseup",m.mouseMoveEvent="mousemove",m.touchStartEvent="touchstart",m.touchMoveEvent="touchmove",m.mouseLeaveEvent="mouseleave",m.mouseOutEvent="mouseout",m.touchCancelEvent="touchcancel",m.resizeEvent="resize",m.visibilityChangeEvent="visibilitychange",m.noPolygonDataLoaded="No polygon data loaded.",m.noPolygonFound="No polygon found, you need to specify SVG url in config.";new Map,new Map,new Map,new Map,new Map,new Map,new Map;new WeakSet;class y extends class{constructor(t){this.container=t,this.type=0}}{constructor(t){super(t)}isEnabled(){const t=this.container,e=t.interactivity.mouse,n=t.actualOptions.interactivity.events;return n.onHover.enable&&!!e.position&&l("grab",n.onHover.mode)}reset(){}interact(){var t;const e=this.container,n=e.actualOptions,o=n.interactivity;if(o.events.onHover.enable&&e.interactivity.status===m.mouseMoveEvent){const r=e.interactivity.mouse.position;if(!r)return;const a=e.retina.grabModeDistance,i=e.particles.quadTree.queryCircle(r,a);for(const l of i){const i=s(l.getPosition(),r);if(i<=a){const s=o.modes.grab.links,u=s.opacity,c=u-i*u/a;if(c<=0)continue;const d=null!==(t=s.color)&&void 0!==t?t:l.options.links.color;if(!e.particles.grabLineColor){const t=n.interactivity.modes.grab.links;e.particles.grabLineColor=h(d,t.blink,t.consent)}const f=b(l,void 0,e.particles.grabLineColor);if(!f)return;e.canvas.drawGrabLine(l,f,c,r)}}}}}async function M(t){await t.addInteractor("externalGrab",(t=>new y(t)))}return e}()}));
|
|
@@ -1576,6 +1576,8 @@
|
|
|
1576
1576
|
}
|
|
1577
1577
|
init() {
|
|
1578
1578
|
const interactors = Plugins.getInteractors(this.container, true);
|
|
1579
|
+
this.externalInteractors = [];
|
|
1580
|
+
this.particleInteractors = [];
|
|
1579
1581
|
for (const interactor of interactors) {
|
|
1580
1582
|
switch (interactor.type) {
|
|
1581
1583
|
case 0:
|
|
@@ -3525,7 +3527,7 @@
|
|
|
3525
3527
|
this.fullScreen = new FullScreen;
|
|
3526
3528
|
this.detectRetina = true;
|
|
3527
3529
|
this.duration = 0;
|
|
3528
|
-
this.fpsLimit =
|
|
3530
|
+
this.fpsLimit = 120;
|
|
3529
3531
|
this.interactivity = new Interactivity;
|
|
3530
3532
|
this.manualParticles = [];
|
|
3531
3533
|
this.motion = new Motion;
|
|
@@ -4392,7 +4394,7 @@
|
|
|
4392
4394
|
class Container_Container {
|
|
4393
4395
|
constructor(id, sourceOptions, ...presets) {
|
|
4394
4396
|
this.id = id;
|
|
4395
|
-
this.fpsLimit =
|
|
4397
|
+
this.fpsLimit = 120;
|
|
4396
4398
|
this.duration = 0;
|
|
4397
4399
|
this.lifeTime = 0;
|
|
4398
4400
|
this.firstStart = true;
|
|
@@ -4565,7 +4567,7 @@
|
|
|
4565
4567
|
this.particles.clear();
|
|
4566
4568
|
this.canvas.clear();
|
|
4567
4569
|
if (this.interactivity.element instanceof HTMLElement && this.intersectionObserver) {
|
|
4568
|
-
this.intersectionObserver.
|
|
4570
|
+
this.intersectionObserver.unobserve(this.interactivity.element);
|
|
4569
4571
|
}
|
|
4570
4572
|
for (const [, plugin] of this.plugins) {
|
|
4571
4573
|
if (plugin.stop) {
|
|
@@ -4715,7 +4717,7 @@
|
|
|
4715
4717
|
this.zLayers = this.actualOptions.zLayers;
|
|
4716
4718
|
this.duration = getRangeValue(this.actualOptions.duration);
|
|
4717
4719
|
this.lifeTime = 0;
|
|
4718
|
-
this.fpsLimit = this.actualOptions.fpsLimit > 0 ? this.actualOptions.fpsLimit :
|
|
4720
|
+
this.fpsLimit = this.actualOptions.fpsLimit > 0 ? this.actualOptions.fpsLimit : 120;
|
|
4719
4721
|
const availablePlugins = Plugins.getAvailablePlugins(this);
|
|
4720
4722
|
for (const [id, plugin] of availablePlugins) {
|
|
4721
4723
|
this.plugins.set(id, plugin);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.39.
|
|
1
|
+
/*! tsParticles v1.39.3 by Matteo Bruni */
|
|
2
2
|
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var s=t();for(var n in s)("object"==typeof exports?exports:e)[n]=s[n]}}(window,(function(){return function(){"use strict";var e={d:function(t,s){for(var n in s)e.o(s,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:s[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function s(e,t){const s=e.x-t.x,n=e.y-t.y;return{dx:s,dy:n,distance:Math.sqrt(s*s+n*n)}}function n(e,t){switch(t){case"ease-out-quad":return 1-(1-e)**2;case"ease-out-cubic":return 1-(1-e)**3;case"ease-out-quart":return 1-(1-e)**4;case"ease-out-quint":return 1-(1-e)**5;case"ease-out-expo":return 1===e?1:1-Math.pow(2,-10*e);case"ease-out-sine":return Math.sin(e*Math.PI/2);case"ease-out-back":{const t=1.70158;return 1+(t+1)*Math.pow(e-1,3)+t*Math.pow(e-1,2)}case"ease-out-circ":return Math.sqrt(1-Math.pow(e-1,2));default:return e}}function i(e,t){if(t instanceof Array){for(const s of t)if(e.matches(s))return!0;return!1}return e.matches(t)}function o(e,t){return e===t||t instanceof Array&&t.indexOf(e)>-1}function r(e,t){const s=e.selectors;if(s instanceof Array)for(const n of s)t(n,e);else t(s,e)}e.r(t),e.d(t,{loadExternalRepulseInteraction:function(){return p}});class a{constructor(e,t){this.position={x:e,y:t}}}class c extends a{constructor(e,t,s){super(e,t),this.radius=s}contains(e){return t=e,n=this.position,s(t,n).distance<=this.radius;var t,n}intersects(e){const t=e,s=e,n=this.position,i=e.position,o=Math.abs(i.x-n.x),r=Math.abs(i.y-n.y),a=this.radius;if(void 0!==s.radius){return a+s.radius>Math.sqrt(o*o+r+r)}if(void 0!==t.size){const e=t.size.width,s=t.size.height,n=Math.pow(o-e,2)+Math.pow(r-s,2);return!(o>a+e||r>a+s)&&(o<=e||r<=s||n<=a*a)}return!1}}class u{}u.generatedAttribute="generated",u.randomColorValue="random",u.midColorValue="mid",u.touchEndEvent="touchend",u.mouseDownEvent="mousedown",u.mouseUpEvent="mouseup",u.mouseMoveEvent="mousemove",u.touchStartEvent="touchstart",u.touchMoveEvent="touchmove",u.mouseLeaveEvent="mouseleave",u.mouseOutEvent="mouseout",u.touchCancelEvent="touchcancel",u.resizeEvent="resize",u.visibilityChangeEvent="visibilitychange",u.noPolygonDataLoaded="No polygon data loaded.",u.noPolygonFound="No polygon found, you need to specify SVG url in config.";new Map,new Map,new Map,new Map,new Map,new Map,new Map;class l extends a{constructor(e,t,s,n){super(e,t),this.size={height:n,width:s}}contains(e){const t=this.size.width,s=this.size.height,n=this.position;return e.x>=n.x&&e.x<=n.x+t&&e.y>=n.y&&e.y<=n.y+s}intersects(e){const t=e,s=e,n=this.size.width,i=this.size.height,o=this.position,r=e.position;if(void 0!==s.radius)return s.intersects(this);if(void 0!==t.size){const e=t.size,s=e.width,a=e.height;return r.x<o.x+n&&r.x+s>o.x&&r.y<o.y+i&&r.y+a>o.y}return!1}}class h{constructor(e,t){let s,n;if(void 0===t){if("number"==typeof e)throw new Error("tsParticles - Vector not initialized correctly");const t=e;[s,n]=[t.x,t.y]}else[s,n]=[e,t];this.x=s,this.y=n}static clone(e){return h.create(e.x,e.y)}static create(e,t){return new h(e,t)}static get origin(){return h.create(0,0)}get angle(){return Math.atan2(this.y,this.x)}set angle(e){this.updateFromAngle(e,this.length)}get length(){return Math.sqrt(this.x**2+this.y**2)}set length(e){this.updateFromAngle(this.angle,e)}add(e){return h.create(this.x+e.x,this.y+e.y)}addTo(e){this.x+=e.x,this.y+=e.y}sub(e){return h.create(this.x-e.x,this.y-e.y)}subFrom(e){this.x-=e.x,this.y-=e.y}mult(e){return h.create(this.x*e,this.y*e)}multTo(e){this.x*=e,this.y*=e}div(e){return h.create(this.x/e,this.y/e)}divTo(e){this.x/=e,this.y/=e}distanceTo(e){return this.sub(e).length}getLengthSq(){return this.x**2+this.y**2}distanceToSq(e){return this.sub(e).getLengthSq()}manhattanDistanceTo(e){return Math.abs(e.x-this.x)+Math.abs(e.y-this.y)}copy(){return h.clone(this)}setTo(e){this.x=e.x,this.y=e.y}rotate(e){return h.create(this.x*Math.cos(e)-this.y*Math.sin(e),this.x*Math.sin(e)+this.y*Math.cos(e))}updateFromAngle(e,t){this.x=Math.cos(e)*t,this.y=Math.sin(e)*t}}new WeakSet;class d extends class{constructor(e){this.container=e,this.type=0}}{constructor(e){super(e)}isEnabled(){const e=this.container,t=e.actualOptions,s=e.interactivity.mouse,n=t.interactivity.events,i=function(e,t){return t instanceof Array?!!t.find((t=>t.enable&&o(e,t.mode))):o(e,t.mode)}("repulse",n.onDiv);if(!(i||n.onHover.enable&&s.position||n.onClick.enable&&s.clickPosition))return!1;const r=n.onHover.mode,a=n.onClick.mode;return o("repulse",r)||o("repulse",a)||i}reset(){}interact(){const e=this.container,t=e.actualOptions,s=e.interactivity.status===u.mouseMoveEvent,n=t.interactivity.events,i=n.onHover.enable,a=n.onHover.mode,c=n.onClick.enable,l=n.onClick.mode,h=n.onDiv;s&&i&&o("repulse",a)?this.hoverRepulse():c&&o("repulse",l)?this.clickRepulse():function(e,t,s){if(t instanceof Array)for(const n of t){const t=n.mode;n.enable&&o(e,t)&&r(n,s)}else{const n=t.mode;t.enable&&o(e,n)&&r(t,s)}}("repulse",h,((e,t)=>this.singleSelectorRepulse(e,t)))}singleSelectorRepulse(e,t){const s=this.container,n=document.querySelectorAll(e);n.length&&n.forEach((e=>{const n=e,o=s.retina.pixelRatio,r={x:(n.offsetLeft+n.offsetWidth/2)*o,y:(n.offsetTop+n.offsetHeight/2)*o},a=n.offsetWidth/2*o,u="circle"===t.type?new c(r.x,r.y,a):new l(n.offsetLeft*o,n.offsetTop*o,n.offsetWidth*o,n.offsetHeight*o),h=function(e,t){if(t&&e)return e instanceof Array?e.find((e=>i(t,e.selectors))):i(t,e.selectors)?e:void 0}(s.actualOptions.interactivity.modes.repulse.divs,n);this.processRepulse(r,a,u,h)}))}hoverRepulse(){const e=this.container,t=e.interactivity.mouse.position;if(!t)return;const s=e.retina.repulseModeDistance;this.processRepulse(t,s,new c(t.x,t.y,s))}processRepulse(e,t,i,o){var r;const a=this.container,c=a.particles.quadTree.query(i),u=a.actualOptions.interactivity.modes.repulse;for(const i of c){const{dx:a,dy:c,distance:f}=s(i.position,e),y=(null!==(r=null==o?void 0:o.speed)&&void 0!==r?r:u.speed)*u.factor,v=(l=n(1-f/t,u.easing)*y,d=0,p=u.maxSpeed,Math.min(Math.max(l,d),p)),x=h.create(0===f?y:a/f*v,0===f?y:c/f*v);i.position.addTo(x)}var l,d,p}clickRepulse(){const e=this.container;if(e.repulse.finish||(e.repulse.count||(e.repulse.count=0),e.repulse.count++,e.repulse.count===e.particles.count&&(e.repulse.finish=!0)),e.repulse.clicking){const t=e.retina.repulseModeDistance,n=Math.pow(t/6,3),i=e.interactivity.mouse.clickPosition;if(void 0===i)return;const o=new c(i.x,i.y,n),r=e.particles.quadTree.query(o);for(const t of r){const{dx:o,dy:r,distance:a}=s(i,t.position),c=a**2,u=e.actualOptions.interactivity.modes.repulse.speed,l=-n*u/c;if(c<=n){e.repulse.particles.push(t);const s=h.create(o,r);s.length=l,t.velocity.setTo(s)}}}else if(!1===e.repulse.clicking){for(const t of e.repulse.particles)t.velocity.setTo(t.initialVelocity);e.repulse.particles=[]}}}async function p(e){await e.addInteractor("externalRepulse",(e=>new d(e)))}return t}()}));
|
|
@@ -1568,6 +1568,8 @@
|
|
|
1568
1568
|
}
|
|
1569
1569
|
init() {
|
|
1570
1570
|
const interactors = Plugins.getInteractors(this.container, true);
|
|
1571
|
+
this.externalInteractors = [];
|
|
1572
|
+
this.particleInteractors = [];
|
|
1571
1573
|
for (const interactor of interactors) {
|
|
1572
1574
|
switch (interactor.type) {
|
|
1573
1575
|
case 0:
|
|
@@ -3394,7 +3396,7 @@
|
|
|
3394
3396
|
this.fullScreen = new FullScreen;
|
|
3395
3397
|
this.detectRetina = true;
|
|
3396
3398
|
this.duration = 0;
|
|
3397
|
-
this.fpsLimit =
|
|
3399
|
+
this.fpsLimit = 120;
|
|
3398
3400
|
this.interactivity = new Interactivity;
|
|
3399
3401
|
this.manualParticles = [];
|
|
3400
3402
|
this.motion = new Motion;
|
|
@@ -4261,7 +4263,7 @@
|
|
|
4261
4263
|
class Container_Container {
|
|
4262
4264
|
constructor(id, sourceOptions, ...presets) {
|
|
4263
4265
|
this.id = id;
|
|
4264
|
-
this.fpsLimit =
|
|
4266
|
+
this.fpsLimit = 120;
|
|
4265
4267
|
this.duration = 0;
|
|
4266
4268
|
this.lifeTime = 0;
|
|
4267
4269
|
this.firstStart = true;
|
|
@@ -4434,7 +4436,7 @@
|
|
|
4434
4436
|
this.particles.clear();
|
|
4435
4437
|
this.canvas.clear();
|
|
4436
4438
|
if (this.interactivity.element instanceof HTMLElement && this.intersectionObserver) {
|
|
4437
|
-
this.intersectionObserver.
|
|
4439
|
+
this.intersectionObserver.unobserve(this.interactivity.element);
|
|
4438
4440
|
}
|
|
4439
4441
|
for (const [, plugin] of this.plugins) {
|
|
4440
4442
|
if (plugin.stop) {
|
|
@@ -4584,7 +4586,7 @@
|
|
|
4584
4586
|
this.zLayers = this.actualOptions.zLayers;
|
|
4585
4587
|
this.duration = getRangeValue(this.actualOptions.duration);
|
|
4586
4588
|
this.lifeTime = 0;
|
|
4587
|
-
this.fpsLimit = this.actualOptions.fpsLimit > 0 ? this.actualOptions.fpsLimit :
|
|
4589
|
+
this.fpsLimit = this.actualOptions.fpsLimit > 0 ? this.actualOptions.fpsLimit : 120;
|
|
4588
4590
|
const availablePlugins = Plugins.getAvailablePlugins(this);
|
|
4589
4591
|
for (const [id, plugin] of availablePlugins) {
|
|
4590
4592
|
this.plugins.set(id, plugin);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.39.
|
|
1
|
+
/*! tsParticles v1.39.3 by Matteo Bruni */
|
|
2
2
|
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var o=e();for(var i in o)("object"==typeof exports?exports:t)[i]=o[i]}}(window,(function(){return function(){"use strict";var t={d:function(e,o){for(var i in o)t.o(o,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:o[i]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function o(t,e){return t===e||e instanceof Array&&e.indexOf(t)>-1}t.r(e),t.d(e,{loadExternalTrailInteraction:function(){return a}});class i{}i.generatedAttribute="generated",i.randomColorValue="random",i.midColorValue="mid",i.touchEndEvent="touchend",i.mouseDownEvent="mousedown",i.mouseUpEvent="mouseup",i.mouseMoveEvent="mousemove",i.touchStartEvent="touchstart",i.touchMoveEvent="touchmove",i.mouseLeaveEvent="mouseleave",i.mouseOutEvent="mouseout",i.touchCancelEvent="touchcancel",i.resizeEvent="resize",i.visibilityChangeEvent="visibilitychange",i.noPolygonDataLoaded="No polygon data loaded.",i.noPolygonFound="No polygon found, you need to specify SVG url in config.";new Map,new Map,new Map,new Map,new Map,new Map,new Map;new WeakSet;class n extends class{constructor(t){this.container=t,this.type=0}}{constructor(t){super(t),this.delay=0}interact(t){var e,o,i,n;if(!this.container.retina.reduceFactor)return;const a=this.container,r=a.actualOptions.interactivity.modes.trail,s=1e3*r.delay/this.container.retina.reduceFactor;if(this.delay<s&&(this.delay+=t.value),this.delay<s)return;let u=!0;r.pauseOnStop&&(a.interactivity.mouse.position===this.lastPosition||(null===(e=a.interactivity.mouse.position)||void 0===e?void 0:e.x)===(null===(o=this.lastPosition)||void 0===o?void 0:o.x)&&(null===(i=a.interactivity.mouse.position)||void 0===i?void 0:i.y)===(null===(n=this.lastPosition)||void 0===n?void 0:n.y))&&(u=!1),a.interactivity.mouse.position?this.lastPosition={x:a.interactivity.mouse.position.x,y:a.interactivity.mouse.position.y}:delete this.lastPosition,u&&a.particles.push(r.quantity,a.interactivity.mouse,r.particles),this.delay-=s}isEnabled(){const t=this.container,e=t.actualOptions,i=t.interactivity.mouse,n=e.interactivity.events;return i.clicking&&i.inside&&!!i.position&&o("trail",n.onClick.mode)||i.inside&&!!i.position&&o("trail",n.onHover.mode)}reset(){}}async function a(t){await t.addInteractor("externalTrail",(t=>new n(t)))}return e}()}));
|
|
@@ -1562,6 +1562,8 @@
|
|
|
1562
1562
|
}
|
|
1563
1563
|
init() {
|
|
1564
1564
|
const interactors = Plugins.getInteractors(this.container, true);
|
|
1565
|
+
this.externalInteractors = [];
|
|
1566
|
+
this.particleInteractors = [];
|
|
1565
1567
|
for (const interactor of interactors) {
|
|
1566
1568
|
switch (interactor.type) {
|
|
1567
1569
|
case 0:
|
|
@@ -3394,7 +3396,7 @@
|
|
|
3394
3396
|
this.fullScreen = new FullScreen;
|
|
3395
3397
|
this.detectRetina = true;
|
|
3396
3398
|
this.duration = 0;
|
|
3397
|
-
this.fpsLimit =
|
|
3399
|
+
this.fpsLimit = 120;
|
|
3398
3400
|
this.interactivity = new Interactivity;
|
|
3399
3401
|
this.manualParticles = [];
|
|
3400
3402
|
this.motion = new Motion;
|
|
@@ -4261,7 +4263,7 @@
|
|
|
4261
4263
|
class Container_Container {
|
|
4262
4264
|
constructor(id, sourceOptions, ...presets) {
|
|
4263
4265
|
this.id = id;
|
|
4264
|
-
this.fpsLimit =
|
|
4266
|
+
this.fpsLimit = 120;
|
|
4265
4267
|
this.duration = 0;
|
|
4266
4268
|
this.lifeTime = 0;
|
|
4267
4269
|
this.firstStart = true;
|
|
@@ -4434,7 +4436,7 @@
|
|
|
4434
4436
|
this.particles.clear();
|
|
4435
4437
|
this.canvas.clear();
|
|
4436
4438
|
if (this.interactivity.element instanceof HTMLElement && this.intersectionObserver) {
|
|
4437
|
-
this.intersectionObserver.
|
|
4439
|
+
this.intersectionObserver.unobserve(this.interactivity.element);
|
|
4438
4440
|
}
|
|
4439
4441
|
for (const [, plugin] of this.plugins) {
|
|
4440
4442
|
if (plugin.stop) {
|
|
@@ -4584,7 +4586,7 @@
|
|
|
4584
4586
|
this.zLayers = this.actualOptions.zLayers;
|
|
4585
4587
|
this.duration = getRangeValue(this.actualOptions.duration);
|
|
4586
4588
|
this.lifeTime = 0;
|
|
4587
|
-
this.fpsLimit = this.actualOptions.fpsLimit > 0 ? this.actualOptions.fpsLimit :
|
|
4589
|
+
this.fpsLimit = this.actualOptions.fpsLimit > 0 ? this.actualOptions.fpsLimit : 120;
|
|
4588
4590
|
const availablePlugins = Plugins.getAvailablePlugins(this);
|
|
4589
4591
|
for (const [id, plugin] of availablePlugins) {
|
|
4590
4592
|
this.plugins.set(id, plugin);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.39.
|
|
1
|
+
/*! tsParticles v1.39.3 by Matteo Bruni */
|
|
2
2
|
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}}(window,(function(){return function(){"use strict";var e={d:function(t,o){for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function o(e,t){const o=e.x-t.x,n=e.y-t.y;return{dx:o,dy:n,distance:Math.sqrt(o*o+n*n)}}e.r(t),e.d(t,{loadParticlesAttractInteraction:function(){return r}});class n{}n.generatedAttribute="generated",n.randomColorValue="random",n.midColorValue="mid",n.touchEndEvent="touchend",n.mouseDownEvent="mousedown",n.mouseUpEvent="mouseup",n.mouseMoveEvent="mousemove",n.touchStartEvent="touchstart",n.touchMoveEvent="touchmove",n.mouseLeaveEvent="mouseleave",n.mouseOutEvent="mouseout",n.touchCancelEvent="touchcancel",n.resizeEvent="resize",n.visibilityChangeEvent="visibilitychange",n.noPolygonDataLoaded="No polygon data loaded.",n.noPolygonFound="No polygon found, you need to specify SVG url in config.";new Map,new Map,new Map,new Map,new Map,new Map,new Map;new WeakSet;class a extends class{constructor(e){this.container=e,this.type=1}}{constructor(e){super(e)}interact(e){var t;const n=this.container,a=null!==(t=e.retina.attractDistance)&&void 0!==t?t:n.retina.attractDistance,r=e.getPosition(),i=n.particles.quadTree.queryCircle(r,a);for(const t of i){if(e===t||!t.options.move.attract.enable||t.destroyed||t.spawning)continue;const n=t.getPosition(),{dx:a,dy:i}=o(r,n),c=e.options.move.attract.rotate,s=a/(1e3*c.x),u=i/(1e3*c.y),l=t.size.value/e.size.value,d=1/l;e.velocity.x-=s*l,e.velocity.y-=u*l,t.velocity.x+=s*d,t.velocity.y+=u*d}}isEnabled(e){return e.options.move.attract.enable}reset(){}}async function r(e){await e.addInteractor("particlesAttract",(e=>new a(e)))}return t}()}));
|
|
@@ -515,6 +515,8 @@
|
|
|
515
515
|
}
|
|
516
516
|
init() {
|
|
517
517
|
const interactors = Plugins.getInteractors(this.container, true);
|
|
518
|
+
this.externalInteractors = [];
|
|
519
|
+
this.particleInteractors = [];
|
|
518
520
|
for (const interactor of interactors) {
|
|
519
521
|
switch (interactor.type) {
|
|
520
522
|
case 0:
|
|
@@ -2438,7 +2440,7 @@
|
|
|
2438
2440
|
this.fullScreen = new FullScreen;
|
|
2439
2441
|
this.detectRetina = true;
|
|
2440
2442
|
this.duration = 0;
|
|
2441
|
-
this.fpsLimit =
|
|
2443
|
+
this.fpsLimit = 120;
|
|
2442
2444
|
this.interactivity = new Interactivity;
|
|
2443
2445
|
this.manualParticles = [];
|
|
2444
2446
|
this.motion = new Motion;
|
|
@@ -3305,7 +3307,7 @@
|
|
|
3305
3307
|
class Container_Container {
|
|
3306
3308
|
constructor(id, sourceOptions, ...presets) {
|
|
3307
3309
|
this.id = id;
|
|
3308
|
-
this.fpsLimit =
|
|
3310
|
+
this.fpsLimit = 120;
|
|
3309
3311
|
this.duration = 0;
|
|
3310
3312
|
this.lifeTime = 0;
|
|
3311
3313
|
this.firstStart = true;
|
|
@@ -3478,7 +3480,7 @@
|
|
|
3478
3480
|
this.particles.clear();
|
|
3479
3481
|
this.canvas.clear();
|
|
3480
3482
|
if (this.interactivity.element instanceof HTMLElement && this.intersectionObserver) {
|
|
3481
|
-
this.intersectionObserver.
|
|
3483
|
+
this.intersectionObserver.unobserve(this.interactivity.element);
|
|
3482
3484
|
}
|
|
3483
3485
|
for (const [, plugin] of this.plugins) {
|
|
3484
3486
|
if (plugin.stop) {
|
|
@@ -3628,7 +3630,7 @@
|
|
|
3628
3630
|
this.zLayers = this.actualOptions.zLayers;
|
|
3629
3631
|
this.duration = getRangeValue(this.actualOptions.duration);
|
|
3630
3632
|
this.lifeTime = 0;
|
|
3631
|
-
this.fpsLimit = this.actualOptions.fpsLimit > 0 ? this.actualOptions.fpsLimit :
|
|
3633
|
+
this.fpsLimit = this.actualOptions.fpsLimit > 0 ? this.actualOptions.fpsLimit : 120;
|
|
3632
3634
|
const availablePlugins = Plugins.getAvailablePlugins(this);
|
|
3633
3635
|
for (const [id, plugin] of availablePlugins) {
|
|
3634
3636
|
this.plugins.set(id, plugin);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.39.
|
|
1
|
+
/*! tsParticles v1.39.3 by Matteo Bruni */
|
|
2
2
|
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var o=e();for(var i in o)("object"==typeof exports?exports:t)[i]=o[i]}}(window,(function(){return function(){"use strict";var t={d:function(e,o){for(var i in o)t.o(o,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:o[i]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{loadParticlesCollisionsInteraction:function(){return g}});class o{}o.generatedAttribute="generated",o.randomColorValue="random",o.midColorValue="mid",o.touchEndEvent="touchend",o.mouseDownEvent="mousedown",o.mouseUpEvent="mouseup",o.mouseMoveEvent="mousemove",o.touchStartEvent="touchstart",o.touchMoveEvent="touchmove",o.mouseLeaveEvent="mouseleave",o.mouseOutEvent="mouseout",o.touchCancelEvent="touchcancel",o.resizeEvent="resize",o.visibilityChangeEvent="visibilitychange",o.noPolygonDataLoaded="No polygon data loaded.",o.noPolygonFound="No polygon found, you need to specify SVG url in config.";new Map,new Map,new Map,new Map,new Map,new Map,new Map;class i{constructor(t,e){let o,i;if(void 0===e){if("number"==typeof t)throw new Error("tsParticles - Vector not initialized correctly");const e=t;[o,i]=[e.x,e.y]}else[o,i]=[t,e];this.x=o,this.y=i}static clone(t){return i.create(t.x,t.y)}static create(t,e){return new i(t,e)}static get origin(){return i.create(0,0)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.updateFromAngle(t,this.length)}get length(){return Math.sqrt(this.x**2+this.y**2)}set length(t){this.updateFromAngle(this.angle,t)}add(t){return i.create(this.x+t.x,this.y+t.y)}addTo(t){this.x+=t.x,this.y+=t.y}sub(t){return i.create(this.x-t.x,this.y-t.y)}subFrom(t){this.x-=t.x,this.y-=t.y}mult(t){return i.create(this.x*t,this.y*t)}multTo(t){this.x*=t,this.y*=t}div(t){return i.create(this.x/t,this.y/t)}divTo(t){this.x/=t,this.y/=t}distanceTo(t){return this.sub(t).length}getLengthSq(){return this.x**2+this.y**2}distanceToSq(t){return this.sub(t).getLengthSq()}manhattanDistanceTo(t){return Math.abs(t.x-this.x)+Math.abs(t.y-this.y)}copy(){return i.clone(this)}setTo(t){this.x=t.x,this.y=t.y}rotate(t){return i.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t))}updateFromAngle(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}new WeakSet;function n(t,e,o){return Math.min(Math.max(t,e),o)}function s(t){return"number"==typeof t?t:function(t){const e=r(t);let o=a(t);return e===o&&(o=0),Math.random()*(e-o)+o}(t)}function a(t){return"number"==typeof t?t:t.min}function r(t){return"number"==typeof t?t:t.max}function u(t,e){if(t===e||void 0===e&&"number"==typeof t)return t;const o=a(t),i=r(t);return void 0!==e?{min:Math.min(o,e),max:Math.max(i,e)}:u(o,i)}function c(t){const e=t.random,{enable:o,minimumValue:i}="boolean"==typeof e?{enable:e,minimumValue:0}:e;return s(o?u(t.value,i):t.value)}function d(t,e){const o=t.x-e.x,i=t.y-e.y;return{dx:o,dy:i,distance:Math.sqrt(o*o+i*i)}}function l(t,e,o,n){return i.create(t.x*(o-n)/(o+n)+2*e.x*n/(o+n),t.y)}function y(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:i.create(c(t.options.bounce.horizontal),c(t.options.bounce.vertical))}}function h(t,e){!function(t,e){const{x:o,y:i}=t.velocity.sub(e.velocity),[n,s]=[t.position,e.position],{dx:a,dy:r}=d(s,n);if(o*a+i*r>=0){const o=-Math.atan2(r,a),i=t.mass,n=e.mass,s=t.velocity.rotate(o),u=e.velocity.rotate(o),c=l(s,u,i,n),d=l(u,s,i,n),y=c.rotate(-o),h=d.rotate(-o);t.velocity.x=y.x*t.factor.x,t.velocity.y=y.y*t.factor.y,e.velocity.x=h.x*e.factor.x,e.velocity.y=h.y*e.factor.y}}(y(t),y(e))}class f extends class{constructor(t){this.container=t,this.type=1}}{constructor(t){super(t)}isEnabled(t){return t.options.collisions.enable}reset(){}interact(t){const e=this.container,o=t.getPosition(),i=t.getRadius(),n=e.particles.quadTree.queryCircle(o,2*i);for(const e of n){if(t===e||!e.options.collisions.enable||t.options.collisions.mode!==e.options.collisions.mode||e.destroyed||e.spawning)continue;const n=e.getPosition();if(Math.round(o.z)!==Math.round(n.z))continue;d(o,n).distance<=i+e.getRadius()&&this.resolveCollision(t,e)}}resolveCollision(t,e){switch(t.options.collisions.mode){case"absorb":this.absorb(t,e);break;case"bounce":h(t,e);break;case"destroy":!function(t,e){t.unbreakable||e.unbreakable||h(t,e),void 0===t.getRadius()&&void 0!==e.getRadius()?t.destroy():void 0!==t.getRadius()&&void 0===e.getRadius()?e.destroy():void 0!==t.getRadius()&&void 0!==e.getRadius()&&(t.getRadius()>=e.getRadius()?e.destroy():t.destroy())}(t,e)}}absorb(t,e){const o=this.container,i=o.fpsLimit/1e3;if(void 0===t.getRadius()&&void 0!==e.getRadius())t.destroy();else if(void 0!==t.getRadius()&&void 0===e.getRadius())e.destroy();else if(void 0!==t.getRadius()&&void 0!==e.getRadius())if(t.getRadius()>=e.getRadius()){const s=n(t.getRadius()/e.getRadius(),0,e.getRadius())*i;t.size.value+=s,e.size.value-=s,e.getRadius()<=o.retina.pixelRatio&&(e.size.value=0,e.destroy())}else{const s=n(e.getRadius()/t.getRadius(),0,t.getRadius())*i;t.size.value-=s,e.size.value+=s,t.getRadius()<=o.retina.pixelRatio&&(t.size.value=0,t.destroy())}}}async function g(t){await t.addInteractor("particlesCollisions",(t=>new f(t)))}return e}()}));
|
|
@@ -1602,6 +1602,8 @@
|
|
|
1602
1602
|
}
|
|
1603
1603
|
init() {
|
|
1604
1604
|
const interactors = Plugins.getInteractors(this.container, true);
|
|
1605
|
+
this.externalInteractors = [];
|
|
1606
|
+
this.particleInteractors = [];
|
|
1605
1607
|
for (const interactor of interactors) {
|
|
1606
1608
|
switch (interactor.type) {
|
|
1607
1609
|
case 0:
|
|
@@ -3434,7 +3436,7 @@
|
|
|
3434
3436
|
this.fullScreen = new FullScreen;
|
|
3435
3437
|
this.detectRetina = true;
|
|
3436
3438
|
this.duration = 0;
|
|
3437
|
-
this.fpsLimit =
|
|
3439
|
+
this.fpsLimit = 120;
|
|
3438
3440
|
this.interactivity = new Interactivity;
|
|
3439
3441
|
this.manualParticles = [];
|
|
3440
3442
|
this.motion = new Motion;
|
|
@@ -4301,7 +4303,7 @@
|
|
|
4301
4303
|
class Container_Container {
|
|
4302
4304
|
constructor(id, sourceOptions, ...presets) {
|
|
4303
4305
|
this.id = id;
|
|
4304
|
-
this.fpsLimit =
|
|
4306
|
+
this.fpsLimit = 120;
|
|
4305
4307
|
this.duration = 0;
|
|
4306
4308
|
this.lifeTime = 0;
|
|
4307
4309
|
this.firstStart = true;
|
|
@@ -4474,7 +4476,7 @@
|
|
|
4474
4476
|
this.particles.clear();
|
|
4475
4477
|
this.canvas.clear();
|
|
4476
4478
|
if (this.interactivity.element instanceof HTMLElement && this.intersectionObserver) {
|
|
4477
|
-
this.intersectionObserver.
|
|
4479
|
+
this.intersectionObserver.unobserve(this.interactivity.element);
|
|
4478
4480
|
}
|
|
4479
4481
|
for (const [, plugin] of this.plugins) {
|
|
4480
4482
|
if (plugin.stop) {
|
|
@@ -4624,7 +4626,7 @@
|
|
|
4624
4626
|
this.zLayers = this.actualOptions.zLayers;
|
|
4625
4627
|
this.duration = getRangeValue(this.actualOptions.duration);
|
|
4626
4628
|
this.lifeTime = 0;
|
|
4627
|
-
this.fpsLimit = this.actualOptions.fpsLimit > 0 ? this.actualOptions.fpsLimit :
|
|
4629
|
+
this.fpsLimit = this.actualOptions.fpsLimit > 0 ? this.actualOptions.fpsLimit : 120;
|
|
4628
4630
|
const availablePlugins = Plugins.getAvailablePlugins(this);
|
|
4629
4631
|
for (const [id, plugin] of availablePlugins) {
|
|
4630
4632
|
this.plugins.set(id, plugin);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.39.
|
|
1
|
+
/*! tsParticles v1.39.3 by Matteo Bruni */
|
|
2
2
|
!function(t,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var i=n();for(var e in i)("object"==typeof exports?exports:t)[e]=i[e]}}(window,(function(){return function(){"use strict";var t={d:function(n,i){for(var e in i)t.o(i,e)&&!t.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:i[e]})},o:function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},n={};function i(t,n,i,e){return Math.floor((t*i+n*e)/(i+e))}function e(t){const n=s(t);let i=o(t);return n===i&&(i=0),Math.random()*(n-i)+i}function o(t){return"number"==typeof t?t:t.min}function s(t){return"number"==typeof t?t:t.max}function r(t,n){if(t===n||void 0===n&&"number"==typeof t)return t;const i=o(t),e=s(t);return void 0!==n?{min:Math.min(i,n),max:Math.max(e,n)}:r(i,e)}function a(t,n){const i=t.x-n.x,e=t.y-n.y;return{dx:i,dy:e,distance:Math.sqrt(i*i+e*e)}}function l(t,n){return a(t,n).distance}function c(t,n,i=!0){return t[void 0!==n&&i?n%t.length:function(t){return Math.floor(Math.random()*t.length)}(t)]}function u(t,n,i){let e=i;return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(n-t)*e:e<.5?n:e<2/3?t+(n-t)*(2/3-e)*6:t}function d(t){if(t.startsWith("rgb")){const n=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([\d.]+)\s*)?\)/i.exec(t);return n?{a:n.length>4?parseFloat(n[5]):1,b:parseInt(n[3],10),g:parseInt(n[2],10),r:parseInt(n[1],10)}:void 0}if(t.startsWith("hsl")){const n=/hsla?\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i.exec(t);return n?function(t){const n=f(t);return{a:t.a,b:n.b,g:n.g,r:n.r}}({a:n.length>4?parseFloat(n[5]):1,h:parseInt(n[1],10),l:parseInt(n[3],10),s:parseInt(n[2],10)}):void 0}if(t.startsWith("hsv")){const n=/hsva?\(\s*(\d+)°\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i.exec(t);return n?function(t){const n=p(t);return{a:t.a,b:n.b,g:n.g,r:n.r}}({a:n.length>4?parseFloat(n[5]):1,h:parseInt(n[1],10),s:parseInt(n[2],10),v:parseInt(n[3],10)}):void 0}{const n=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,i=t.replace(n,((t,n,i,e,o)=>n+n+i+i+e+e+(void 0!==o?o+o:""))),e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(i);return e?{a:void 0!==e[4]?parseInt(e[4],16)/255:1,b:parseInt(e[3],16),g:parseInt(e[2],16),r:parseInt(e[1],16)}:void 0}}function h(t,n,i=!0){var e,o,s;if(void 0===t)return;const r="string"==typeof t?{value:t}:t;let a;if("string"==typeof r.value)a=r.value===M.randomColorValue?y():function(t){return d(t)}(r.value);else if(r.value instanceof Array){a=h({value:c(r.value,n,i)})}else{const t=r.value,n=null!==(e=t.rgb)&&void 0!==e?e:r.value;if(void 0!==n.r)a=n;else{const n=null!==(o=t.hsl)&&void 0!==o?o:r.value;if(void 0!==n.h&&void 0!==n.l)a=f(n);else{const n=null!==(s=t.hsv)&&void 0!==s?s:r.value;void 0!==n.h&&void 0!==n.v&&(a=p(n))}}}return a}function f(t){const n={b:0,g:0,r:0},i={h:t.h/360,l:t.l/100,s:t.s/100};if(0===i.s)n.b=i.l,n.g=i.l,n.r=i.l;else{const t=i.l<.5?i.l*(1+i.s):i.l+i.s-i.l*i.s,e=2*i.l-t;n.r=u(e,t,i.h+1/3),n.g=u(e,t,i.h),n.b=u(e,t,i.h-1/3)}return n.r=Math.floor(255*n.r),n.g=Math.floor(255*n.g),n.b=Math.floor(255*n.b),n}function p(t){const n={b:0,g:0,r:0},i=t.h/60,e=t.s/100,o=t.v/100,s=o*e,r=s*(1-Math.abs(i%2-1));let a;if(i>=0&&i<=1?a={r:s,g:r,b:0}:i>1&&i<=2?a={r:r,g:s,b:0}:i>2&&i<=3?a={r:0,g:s,b:r}:i>3&&i<=4?a={r:0,g:r,b:s}:i>4&&i<=5?a={r:r,g:0,b:s}:i>5&&i<=6&&(a={r:s,g:0,b:r}),a){const t=o-s;n.r=Math.floor(255*(a.r+t)),n.g=Math.floor(255*(a.g+t)),n.b=Math.floor(255*(a.b+t))}return n}function y(t){const n=null!=t?t:0;return{b:Math.floor(e(r(n,256))),g:Math.floor(e(r(n,256))),r:Math.floor(e(r(n,256)))}}function g(t,n){return`rgba(${t.r}, ${t.g}, ${t.b}, ${null!=n?n:1})`}function v(t,n,e){var o,s;if(e===M.randomColorValue)return y();if("mid"!==e)return e;{const e=null!==(o=t.getFillColor())&&void 0!==o?o:t.getStrokeColor(),r=null!==(s=null==n?void 0:n.getFillColor())&&void 0!==s?s:null==n?void 0:n.getStrokeColor();if(e&&r&&n)return function(t,n,e,o){let s=t,r=n;return void 0===s.r&&(s=f(t)),void 0===r.r&&(r=f(n)),{b:i(s.b,r.b,e,o),g:i(s.g,r.g,e,o),r:i(s.r,r.r,e,o)}}(e,r,t.getRadius(),n.getRadius());{const t=null!=e?e:r;if(t)return f(t)}}}function x(t,n,i){t.beginPath(),t.moveTo(n.x,n.y),t.lineTo(i.x,i.y),t.closePath()}t.r(n),t.d(n,{loadParticlesLinksInteraction:function(){return I}});class b{constructor(t,n){this.position={x:t,y:n}}}class k extends b{constructor(t,n,i){super(t,n),this.radius=i}contains(t){return l(t,this.position)<=this.radius}intersects(t){const n=t,i=t,e=this.position,o=t.position,s=Math.abs(o.x-e.x),r=Math.abs(o.y-e.y),a=this.radius;if(void 0!==i.radius){return a+i.radius>Math.sqrt(s*s+r+r)}if(void 0!==n.size){const t=n.size.width,i=n.size.height,e=Math.pow(s-t,2)+Math.pow(r-i,2);return!(s>a+t||r>a+i)&&(s<=t||r<=i||e<=a*a)}return!1}}class w extends b{constructor(t,n,i,e){super(t,n),this.size={height:e,width:i}}contains(t){const n=this.size.width,i=this.size.height,e=this.position;return t.x>=e.x&&t.x<=e.x+n&&t.y>=e.y&&t.y<=e.y+i}intersects(t){const n=t,i=t,e=this.size.width,o=this.size.height,s=this.position,r=t.position;if(void 0!==i.radius)return i.intersects(this);if(void 0!==n.size){const t=n.size,i=t.width,a=t.height;return r.x<s.x+e&&r.x+i>s.x&&r.y<s.y+o&&r.y+a>s.y}return!1}}class m extends k{constructor(t,n,i,e){super(t,n,i),this.canvasSize=e,this.canvasSize={height:e.height,width:e.width}}contains(t){if(super.contains(t))return!0;const n={x:t.x-this.canvasSize.width,y:t.y};if(super.contains(n))return!0;const i={x:t.x-this.canvasSize.width,y:t.y-this.canvasSize.height};if(super.contains(i))return!0;const e={x:t.x,y:t.y-this.canvasSize.height};return super.contains(e)}intersects(t){if(super.intersects(t))return!0;const n=t,i=t,e={x:t.position.x-this.canvasSize.width,y:t.position.y-this.canvasSize.height};if(void 0!==i.radius){const t=new k(e.x,e.y,2*i.radius);return super.intersects(t)}if(void 0!==n.size){const t=new w(e.x,e.y,2*n.size.width,2*n.size.height);return super.intersects(t)}return!1}}class M{}M.generatedAttribute="generated",M.randomColorValue="random",M.midColorValue="mid",M.touchEndEvent="touchend",M.mouseDownEvent="mousedown",M.mouseUpEvent="mouseup",M.mouseMoveEvent="mousemove",M.touchStartEvent="touchstart",M.touchMoveEvent="touchmove",M.mouseLeaveEvent="mouseleave",M.mouseOutEvent="mouseout",M.touchCancelEvent="touchcancel",M.resizeEvent="resize",M.visibilityChangeEvent="visibilitychange",M.noPolygonDataLoaded="No polygon data loaded.",M.noPolygonFound="No polygon found, you need to specify SVG url in config.";new Map,new Map,new Map,new Map,new Map,new Map,new Map;new WeakSet;function C(t,n,i,e,o){let s=l(t,n);if(!o||s<=i)return s;if(s=l(t,{x:n.x-e.width,y:n.y}),s<=i)return s;if(s=l(t,{x:n.x-e.width,y:n.y-e.height}),s<=i)return s;return s=l(t,{x:n.x,y:n.y-e.height}),s}class z extends class{constructor(t){this.container=t,this.type=1}}{constructor(t){super(t)}isEnabled(t){return t.options.links.enable}reset(){}interact(t){var n;t.links=[];const i=t.getPosition(),e=this.container,o=e.canvas.size;if(i.x<0||i.y<0||i.x>o.width||i.y>o.height)return;const s=t.options.links,r=s.opacity,a=null!==(n=t.retina.linksDistance)&&void 0!==n?n:e.retina.linksDistance,l=s.warp,c=l?new m(i.x,i.y,a,o):new k(i.x,i.y,a),u=e.particles.quadTree.query(c);for(const n of u){const e=n.options.links;if(t===n||!e.enable||s.id!==e.id||n.spawning||n.destroyed||-1!==t.links.map((t=>t.destination)).indexOf(n)||-1!==n.links.map((t=>t.destination)).indexOf(t))continue;const c=n.getPosition();if(c.x<0||c.y<0||c.x>o.width||c.y>o.height)continue;const u=C(i,c,a,o,l&&e.warp);if(u>a)return;const d=(1-u/a)*r;this.setColor(t),t.links.push({destination:n,opacity:d})}}setColor(t){const n=this.container,i=t.options.links;let e=void 0===i.id?n.particles.linksColor:n.particles.linksColors.get(i.id);if(!e){e=function(t,n,i){const e="string"==typeof t?t:t.value;return e===M.randomColorValue?i?h({value:e}):n?M.randomColorValue:M.midColorValue:h({value:e})}(i.color,i.blink,i.consent),void 0===i.id?n.particles.linksColor=e:n.particles.linksColors.set(i.id,e)}}}class P{constructor(t){this.container=t}particleCreated(t){t.links=[]}particleDestroyed(t){t.links=[]}drawParticle(t,n){const i=n,e=this.container,o=e.particles,s=n.options;if(i.links.length>0){t.save();const n=i.links.filter((t=>e.particles.getLinkFrequency(i,t.destination)<=s.links.frequency));for(const t of n){const r=t.destination;if(s.links.triangles.enable){const a=n.map((t=>t.destination)),l=r.links.filter((t=>e.particles.getLinkFrequency(r,t.destination)<=r.options.links.frequency&&a.indexOf(t.destination)>=0));if(l.length)for(const n of l){const e=n.destination;o.getTriangleFrequency(i,r,e)>s.links.triangles.frequency||this.drawLinkTriangle(i,t,n)}}t.opacity>0&&e.retina.linksWidth>0&&this.drawLinkLine(i,t)}t.restore()}}drawLinkTriangle(t,n,i){var e;const o=this.container,s=o.actualOptions,r=n.destination,a=i.destination,c=t.options.links.triangles,u=null!==(e=c.opacity)&&void 0!==e?e:(n.opacity+i.opacity)/2;if(u<=0)return;const d=t.getPosition(),f=r.getPosition(),p=a.getPosition();o.canvas.draw((n=>{if(l(d,f)>o.retina.linksDistance||l(p,f)>o.retina.linksDistance||l(p,d)>o.retina.linksDistance)return;let i=h(c.color);if(!i){const n=t.options.links,e=void 0!==n.id?o.particles.linksColors.get(n.id):o.particles.linksColor;i=v(t,r,e)}i&&function(t,n,i,e,o,s,r,a){!function(t,n,i,e){t.beginPath(),t.moveTo(n.x,n.y),t.lineTo(i.x,i.y),t.lineTo(e.x,e.y),t.closePath()}(t,n,i,e),o&&(t.globalCompositeOperation=s),t.fillStyle=g(r,a),t.fill()}(n,d,f,p,s.backgroundMask.enable,s.backgroundMask.composite,i,u)}))}drawLinkLine(t,n){const i=this.container,e=i.actualOptions,o=n.destination;let s=n.opacity;const r=t.getPosition(),c=o.getPosition();i.canvas.draw((n=>{var u,d;let f;const p=t.options.twinkle.lines;if(p.enable){const t=p.frequency,n=h(p.color);Math.random()<t&&void 0!==n&&(f=n,s=p.opacity)}if(!f){const n=t.options.links,e=void 0!==n.id?i.particles.linksColors.get(n.id):i.particles.linksColor;f=v(t,o,e)}if(!f)return;const y=null!==(u=t.retina.linksWidth)&&void 0!==u?u:i.retina.linksWidth,b=null!==(d=t.retina.linksDistance)&&void 0!==d?d:i.retina.linksDistance;!function(t,n,i,e,o,s,r,c,u,d,f,p){let y=!1;if(l(i,e)<=o)x(t,i,e),y=!0;else if(r){let n,r;const l=a(i,{x:e.x-s.width,y:e.y});if(l.distance<=o){const t=i.y-l.dy/l.dx*i.x;n={x:0,y:t},r={x:s.width,y:t}}else{const t=a(i,{x:e.x,y:e.y-s.height});if(t.distance<=o){const e=-(i.y-t.dy/t.dx*i.x)/(t.dy/t.dx);n={x:e,y:0},r={x:e,y:s.height}}else{const t=a(i,{x:e.x-s.width,y:e.y-s.height});if(t.distance<=o){const e=i.y-t.dy/t.dx*i.x;n={x:-e/(t.dy/t.dx),y:e},r={x:n.x+s.width,y:n.y+s.height}}}}n&&r&&(x(t,i,n),x(t,e,r),y=!0)}if(y){if(t.lineWidth=n,c&&(t.globalCompositeOperation=u),t.strokeStyle=g(d,f),p.enable){const n=h(p.color);n&&(t.shadowBlur=p.blur,t.shadowColor=g(n))}t.stroke()}}(n,y,r,c,b,i.canvas.size,t.options.links.warp,e.backgroundMask.enable,e.backgroundMask.composite,f,s,t.options.links.shadow)}))}}class S{constructor(){this.id="links"}getPlugin(t){return new P(t)}needsPlugin(){return!0}loadOptions(){}}async function I(t){await async function(t){await t.addInteractor("particlesLinks",(t=>new z(t)))}(t),await async function(t){const n=new S;await t.addPlugin(n)}(t)}return n}()}));
|