tsparticles 1.41.0 → 1.41.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Core/Container.js +2 -2
- package/Core/Interfaces/IExternalInteractor.d.ts +1 -1
- package/Core/Interfaces/IParticlesInteractor.d.ts +1 -1
- package/Core/Particles.d.ts +3 -3
- package/Core/Particles.js +7 -7
- package/Core/Utils/ExternalInteractorBase.d.ts +1 -1
- package/Core/Utils/FrameManager.d.ts +1 -1
- package/Core/Utils/FrameManager.js +2 -2
- package/Core/Utils/InteractionManager.d.ts +2 -2
- package/Core/Utils/InteractionManager.js +4 -4
- package/Core/Utils/ParticlesInteractorBase.d.ts +1 -1
- package/Interactions/External/Attract/Attractor.d.ts +1 -1
- package/Interactions/External/Attract/Attractor.js +1 -1
- package/Interactions/External/Bounce/Bouncer.d.ts +1 -1
- package/Interactions/External/Bounce/Bouncer.js +1 -1
- package/Interactions/External/Bubble/Bubbler.d.ts +1 -1
- package/Interactions/External/Bubble/Bubbler.js +1 -1
- package/Interactions/External/Connect/Connector.d.ts +1 -1
- package/Interactions/External/Connect/Connector.js +1 -1
- package/Interactions/External/Grab/Grabber.d.ts +1 -1
- package/Interactions/External/Grab/Grabber.js +1 -1
- package/Interactions/External/Repulse/Repulser.d.ts +1 -1
- package/Interactions/External/Repulse/Repulser.js +1 -1
- package/Interactions/External/Trail/TrailMaker.d.ts +1 -1
- package/Interactions/External/Trail/TrailMaker.js +1 -1
- package/Interactions/Particles/Attract/Attractor.d.ts +1 -1
- package/Interactions/Particles/Attract/Attractor.js +1 -1
- package/Interactions/Particles/Collisions/Collider.d.ts +1 -1
- package/Interactions/Particles/Collisions/Collider.js +1 -1
- package/Interactions/Particles/Links/Linker.d.ts +1 -1
- package/Interactions/Particles/Links/Linker.js +1 -1
- package/Plugins/PolygonMask/PolygonMaskInstance.js +1 -1
- package/browser/Core/Container.js +2 -2
- package/browser/Core/Interfaces/IExternalInteractor.d.ts +1 -1
- package/browser/Core/Interfaces/IParticlesInteractor.d.ts +1 -1
- package/browser/Core/Particles.d.ts +3 -3
- package/browser/Core/Particles.js +7 -7
- package/browser/Core/Utils/ExternalInteractorBase.d.ts +1 -1
- package/browser/Core/Utils/FrameManager.d.ts +1 -1
- package/browser/Core/Utils/FrameManager.js +2 -2
- package/browser/Core/Utils/InteractionManager.d.ts +2 -2
- package/browser/Core/Utils/InteractionManager.js +4 -4
- package/browser/Core/Utils/ParticlesInteractorBase.d.ts +1 -1
- package/browser/Interactions/External/Attract/Attractor.d.ts +1 -1
- package/browser/Interactions/External/Attract/Attractor.js +1 -1
- package/browser/Interactions/External/Bounce/Bouncer.d.ts +1 -1
- package/browser/Interactions/External/Bounce/Bouncer.js +1 -1
- package/browser/Interactions/External/Bubble/Bubbler.d.ts +1 -1
- package/browser/Interactions/External/Bubble/Bubbler.js +1 -1
- package/browser/Interactions/External/Connect/Connector.d.ts +1 -1
- package/browser/Interactions/External/Connect/Connector.js +1 -1
- package/browser/Interactions/External/Grab/Grabber.d.ts +1 -1
- package/browser/Interactions/External/Grab/Grabber.js +1 -1
- package/browser/Interactions/External/Repulse/Repulser.d.ts +1 -1
- package/browser/Interactions/External/Repulse/Repulser.js +1 -1
- package/browser/Interactions/External/Trail/TrailMaker.d.ts +1 -1
- package/browser/Interactions/External/Trail/TrailMaker.js +1 -1
- package/browser/Interactions/Particles/Attract/Attractor.d.ts +1 -1
- package/browser/Interactions/Particles/Attract/Attractor.js +1 -1
- package/browser/Interactions/Particles/Collisions/Collider.d.ts +1 -1
- package/browser/Interactions/Particles/Collisions/Collider.js +1 -1
- package/browser/Interactions/Particles/Links/Linker.d.ts +1 -1
- package/browser/Interactions/Particles/Links/Linker.js +1 -1
- package/browser/Plugins/PolygonMask/PolygonMaskInstance.js +1 -1
- package/esm/Core/Container.js +2 -2
- package/esm/Core/Interfaces/IExternalInteractor.d.ts +1 -1
- package/esm/Core/Interfaces/IParticlesInteractor.d.ts +1 -1
- package/esm/Core/Particles.d.ts +3 -3
- package/esm/Core/Particles.js +7 -7
- package/esm/Core/Utils/ExternalInteractorBase.d.ts +1 -1
- package/esm/Core/Utils/FrameManager.d.ts +1 -1
- package/esm/Core/Utils/FrameManager.js +2 -2
- package/esm/Core/Utils/InteractionManager.d.ts +2 -2
- package/esm/Core/Utils/InteractionManager.js +4 -4
- package/esm/Core/Utils/ParticlesInteractorBase.d.ts +1 -1
- package/esm/Interactions/External/Attract/Attractor.d.ts +1 -1
- package/esm/Interactions/External/Attract/Attractor.js +1 -1
- package/esm/Interactions/External/Bounce/Bouncer.d.ts +1 -1
- package/esm/Interactions/External/Bounce/Bouncer.js +1 -1
- package/esm/Interactions/External/Bubble/Bubbler.d.ts +1 -1
- package/esm/Interactions/External/Bubble/Bubbler.js +1 -1
- package/esm/Interactions/External/Connect/Connector.d.ts +1 -1
- package/esm/Interactions/External/Connect/Connector.js +1 -1
- package/esm/Interactions/External/Grab/Grabber.d.ts +1 -1
- package/esm/Interactions/External/Grab/Grabber.js +1 -1
- package/esm/Interactions/External/Repulse/Repulser.d.ts +1 -1
- package/esm/Interactions/External/Repulse/Repulser.js +1 -1
- package/esm/Interactions/External/Trail/TrailMaker.d.ts +1 -1
- package/esm/Interactions/External/Trail/TrailMaker.js +1 -1
- package/esm/Interactions/Particles/Attract/Attractor.d.ts +1 -1
- package/esm/Interactions/Particles/Attract/Attractor.js +1 -1
- package/esm/Interactions/Particles/Collisions/Collider.d.ts +1 -1
- package/esm/Interactions/Particles/Collisions/Collider.js +1 -1
- package/esm/Interactions/Particles/Links/Linker.d.ts +1 -1
- package/esm/Interactions/Particles/Links/Linker.js +1 -1
- package/esm/Plugins/PolygonMask/PolygonMaskInstance.js +1 -1
- package/package.json +1 -1
- package/report.html +6 -5
- package/report.slim.html +6 -5
- package/tsparticles.engine.js +15 -15
- package/tsparticles.engine.min.js +2 -2
- package/tsparticles.interaction.external.attract.js +14 -14
- package/tsparticles.interaction.external.attract.min.js +2 -2
- package/tsparticles.interaction.external.bounce.js +14 -14
- package/tsparticles.interaction.external.bounce.min.js +2 -2
- package/tsparticles.interaction.external.bubble.js +14 -14
- package/tsparticles.interaction.external.bubble.min.js +2 -2
- package/tsparticles.interaction.external.connect.js +14 -14
- package/tsparticles.interaction.external.connect.min.js +2 -2
- package/tsparticles.interaction.external.grab.js +14 -14
- package/tsparticles.interaction.external.grab.min.js +2 -2
- package/tsparticles.interaction.external.repulse.js +14 -14
- package/tsparticles.interaction.external.repulse.min.js +2 -2
- package/tsparticles.interaction.external.trail.js +14 -14
- package/tsparticles.interaction.external.trail.min.js +2 -2
- package/tsparticles.interaction.particles.attract.js +14 -14
- package/tsparticles.interaction.particles.attract.min.js +2 -2
- package/tsparticles.interaction.particles.collisions.js +14 -14
- package/tsparticles.interaction.particles.collisions.min.js +2 -2
- package/tsparticles.interaction.particles.links.js +14 -14
- package/tsparticles.interaction.particles.links.min.js +2 -2
- package/tsparticles.js +27 -27
- package/tsparticles.min.js +2 -2
- package/tsparticles.pathseg.min.js +1 -1
- package/tsparticles.plugins.absorbers.js +13 -13
- package/tsparticles.plugins.absorbers.min.js +1 -1
- package/tsparticles.plugins.emitters.js +13 -13
- package/tsparticles.plugins.emitters.min.js +1 -1
- package/tsparticles.plugins.polygonMask.js +15 -15
- package/tsparticles.plugins.polygonMask.min.js +2 -2
- package/tsparticles.shape.circle.min.js +1 -1
- package/tsparticles.shape.image.js +13 -13
- 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 +13 -13
- package/tsparticles.shape.text.min.js +1 -1
- package/tsparticles.slim.js +24 -24
- package/tsparticles.slim.min.js +2 -2
- package/tsparticles.updater.angle.js +13 -13
- package/tsparticles.updater.angle.min.js +1 -1
- package/tsparticles.updater.color.js +13 -13
- package/tsparticles.updater.color.min.js +1 -1
- package/tsparticles.updater.life.js +13 -13
- package/tsparticles.updater.life.min.js +1 -1
- package/tsparticles.updater.opacity.js +13 -13
- package/tsparticles.updater.opacity.min.js +1 -1
- package/tsparticles.updater.outModes.js +13 -13
- package/tsparticles.updater.outModes.min.js +1 -1
- package/tsparticles.updater.roll.js +13 -13
- package/tsparticles.updater.roll.min.js +1 -1
- package/tsparticles.updater.size.js +13 -13
- package/tsparticles.updater.size.min.js +1 -1
- package/tsparticles.updater.strokeColor.js +13 -13
- package/tsparticles.updater.strokeColor.min.js +1 -1
- package/tsparticles.updater.tilt.js +13 -13
- package/tsparticles.updater.tilt.min.js +1 -1
- package/tsparticles.updater.wobble.js +13 -13
- package/tsparticles.updater.wobble.min.js +1 -1
- package/umd/Core/Container.js +2 -2
- package/umd/Core/Interfaces/IExternalInteractor.d.ts +1 -1
- package/umd/Core/Interfaces/IParticlesInteractor.d.ts +1 -1
- package/umd/Core/Particles.d.ts +3 -3
- package/umd/Core/Particles.js +7 -7
- package/umd/Core/Utils/ExternalInteractorBase.d.ts +1 -1
- package/umd/Core/Utils/FrameManager.d.ts +1 -1
- package/umd/Core/Utils/FrameManager.js +2 -2
- package/umd/Core/Utils/InteractionManager.d.ts +2 -2
- package/umd/Core/Utils/InteractionManager.js +4 -4
- package/umd/Core/Utils/ParticlesInteractorBase.d.ts +1 -1
- package/umd/Interactions/External/Attract/Attractor.d.ts +1 -1
- package/umd/Interactions/External/Attract/Attractor.js +1 -1
- package/umd/Interactions/External/Bounce/Bouncer.d.ts +1 -1
- package/umd/Interactions/External/Bounce/Bouncer.js +1 -1
- package/umd/Interactions/External/Bubble/Bubbler.d.ts +1 -1
- package/umd/Interactions/External/Bubble/Bubbler.js +1 -1
- package/umd/Interactions/External/Connect/Connector.d.ts +1 -1
- package/umd/Interactions/External/Connect/Connector.js +1 -1
- package/umd/Interactions/External/Grab/Grabber.d.ts +1 -1
- package/umd/Interactions/External/Grab/Grabber.js +1 -1
- package/umd/Interactions/External/Repulse/Repulser.d.ts +1 -1
- package/umd/Interactions/External/Repulse/Repulser.js +1 -1
- package/umd/Interactions/External/Trail/TrailMaker.d.ts +1 -1
- package/umd/Interactions/External/Trail/TrailMaker.js +1 -1
- package/umd/Interactions/Particles/Attract/Attractor.d.ts +1 -1
- package/umd/Interactions/Particles/Attract/Attractor.js +1 -1
- package/umd/Interactions/Particles/Collisions/Collider.d.ts +1 -1
- package/umd/Interactions/Particles/Collisions/Collider.js +1 -1
- package/umd/Interactions/Particles/Links/Linker.d.ts +1 -1
- package/umd/Interactions/Particles/Links/Linker.js +1 -1
- package/umd/Plugins/PolygonMask/PolygonMaskInstance.js +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.41.
|
|
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,n,o){return Math.floor((e*n+t*o)/(n+o))}function o(e){const t=a(e);let n=r(e);return t===n&&(n=0),Math.random()*(t-n)+n}function r(e){return"number"==typeof e?e:e.min}function a(e){return"number"==typeof e?e:e.max}function i(e,t){if(e===t||void 0===t&&"number"==typeof e)return e;const n=r(e),o=a(e);return void 0!==t?{min:Math.min(n,t),max:Math.max(o,t)}:i(n,o)}function s(e,t){return function(e,t){const n=e.x-t.x,o=e.y-t.y;return{dx:n,dy:o,distance:Math.sqrt(n*n+o*o)}}(e,t).distance}function l(e,t){return e===t||t instanceof Array&&t.indexOf(e)>-1}function u(e,t,n=!0){return e[void 0!==t&&n?t%e.length:function(e){return Math.floor(Math.random()*e.length)}(e)]}function c(e,t,n){let o=n;return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+6*(t-e)*o:o<.5?t:o<2/3?e+(t-e)*(2/3-o)*6:e}function d(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=v(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=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),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,n=e.replace(t,((e,t,n,o,r)=>t+t+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(e,t,n=!0){var o,r,a;if(void 0===e)return;const i="string"==typeof e?{value:e}:e;let s;if("string"==typeof i.value)s=i.value===m.randomColorValue?p():function(e){return d(e)}(i.value);else if(i.value instanceof Array){s=f({value:u(i.value,t,n)})}else{const e=i.value,t=null!==(o=e.rgb)&&void 0!==o?o:i.value;if(void 0!==t.r)s=t;else{const t=null!==(r=e.hsl)&&void 0!==r?r:i.value;if(void 0!==t.h&&void 0!==t.l)s=v(t);else{const t=null!==(a=e.hsv)&&void 0!==a?a:i.value;void 0!==t.h&&void 0!==t.v&&(s=g(t))}}}return s}function v(e){const t={b:0,g:0,r:0},n={h:e.h/360,l:e.l/100,s:e.s/100};if(0===n.s)t.b=n.l,t.g=n.l,t.r=n.l;else{const e=n.l<.5?n.l*(1+n.s):n.l+n.s-n.l*n.s,o=2*n.l-e;t.r=c(o,e,n.h+1/3),t.g=c(o,e,n.h),t.b=c(o,e,n.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 g(e){const t={b:0,g:0,r:0},n=e.h/60,o=e.s/100,r=e.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 e=r-a;t.r=Math.floor(255*(s.r+e)),t.g=Math.floor(255*(s.g+e)),t.b=Math.floor(255*(s.b+e))}return t}function p(e){const t=null!=e?e:0;return{b:Math.floor(o(i(t,256))),g:Math.floor(o(i(t,256))),r:Math.floor(o(i(t,256)))}}function b(e,t,o){var r,a;if(o===m.randomColorValue)return p();if("mid"!==o)return o;{const o=null!==(r=e.getFillColor())&&void 0!==r?r:e.getStrokeColor(),i=null!==(a=null==t?void 0:t.getFillColor())&&void 0!==a?a:null==t?void 0:t.getStrokeColor();if(o&&i&&t)return function(e,t,o,r){let a=e,i=t;return void 0===a.r&&(a=v(e)),void 0===i.r&&(i=v(t)),{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,e.getRadius(),t.getRadius());{const e=null!=o?o:i;if(e)return v(e)}}}function h(e,t,n){const o="string"==typeof e?e:e.value;return o===m.randomColorValue?n?f({value:o}):t?m.randomColorValue:m.midColorValue:f({value:o})}e.r(t),e.d(t,{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 WeakMap;new WeakMap;new WeakMap,new WeakSet;new WeakMap;new WeakMap;new WeakMap;new WeakMap;class y extends class{constructor(e){this.container=e,this.type=0}}{constructor(e){super(e)}isEnabled(){const e=this.container,t=e.interactivity.mouse,n=e.actualOptions.interactivity.events;return n.onHover.enable&&!!t.position&&l("grab",n.onHover.mode)}reset(){}interact(){var e;const t=this.container,n=t.actualOptions,o=n.interactivity;if(o.events.onHover.enable&&t.interactivity.status===m.mouseMoveEvent){const r=t.interactivity.mouse.position;if(!r)return;const a=t.retina.grabModeDistance,i=t.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!==(e=s.color)&&void 0!==e?e:l.options.links.color;if(!t.particles.grabLineColor){const e=n.interactivity.modes.grab.links;t.particles.grabLineColor=h(d,e.blink,e.consent)}const f=b(l,void 0,t.particles.grabLineColor);if(!f)return;t.canvas.drawGrabLine(l,f,c,r)}}}}}async function M(e){await e.addInteractor("externalGrab",(e=>new y(e)))}return t}()}));
|
|
1
|
+
/*! tsParticles v1.41.1 by Matteo Bruni */
|
|
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,n,o){return Math.floor((e*n+t*o)/(n+o))}function o(e){const t=a(e);let n=r(e);return t===n&&(n=0),Math.random()*(t-n)+n}function r(e){return"number"==typeof e?e:e.min}function a(e){return"number"==typeof e?e:e.max}function i(e,t){if(e===t||void 0===t&&"number"==typeof e)return e;const n=r(e),o=a(e);return void 0!==t?{min:Math.min(n,t),max:Math.max(o,t)}:i(n,o)}function s(e,t){return function(e,t){const n=e.x-t.x,o=e.y-t.y;return{dx:n,dy:o,distance:Math.sqrt(n*n+o*o)}}(e,t).distance}function l(e,t){return e===t||t instanceof Array&&t.indexOf(e)>-1}function u(e,t,n=!0){return e[void 0!==t&&n?t%e.length:function(e){return Math.floor(Math.random()*e.length)}(e)]}function c(e,t,n){let o=n;return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+6*(t-e)*o:o<.5?t:o<2/3?e+(t-e)*(2/3-o)*6:e}function d(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=v(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=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),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,n=e.replace(t,((e,t,n,o,r)=>t+t+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(e,t,n=!0){var o,r,a;if(void 0===e)return;const i="string"==typeof e?{value:e}:e;let s;if("string"==typeof i.value)s=i.value===m.randomColorValue?p():function(e){return d(e)}(i.value);else if(i.value instanceof Array){s=f({value:u(i.value,t,n)})}else{const e=i.value,t=null!==(o=e.rgb)&&void 0!==o?o:i.value;if(void 0!==t.r)s=t;else{const t=null!==(r=e.hsl)&&void 0!==r?r:i.value;if(void 0!==t.h&&void 0!==t.l)s=v(t);else{const t=null!==(a=e.hsv)&&void 0!==a?a:i.value;void 0!==t.h&&void 0!==t.v&&(s=g(t))}}}return s}function v(e){const t={b:0,g:0,r:0},n={h:e.h/360,l:e.l/100,s:e.s/100};if(0===n.s)t.b=n.l,t.g=n.l,t.r=n.l;else{const e=n.l<.5?n.l*(1+n.s):n.l+n.s-n.l*n.s,o=2*n.l-e;t.r=c(o,e,n.h+1/3),t.g=c(o,e,n.h),t.b=c(o,e,n.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 g(e){const t={b:0,g:0,r:0},n=e.h/60,o=e.s/100,r=e.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 e=r-a;t.r=Math.floor(255*(s.r+e)),t.g=Math.floor(255*(s.g+e)),t.b=Math.floor(255*(s.b+e))}return t}function p(e){const t=null!=e?e:0;return{b:Math.floor(o(i(t,256))),g:Math.floor(o(i(t,256))),r:Math.floor(o(i(t,256)))}}function b(e,t,o){var r,a;if(o===m.randomColorValue)return p();if("mid"!==o)return o;{const o=null!==(r=e.getFillColor())&&void 0!==r?r:e.getStrokeColor(),i=null!==(a=null==t?void 0:t.getFillColor())&&void 0!==a?a:null==t?void 0:t.getStrokeColor();if(o&&i&&t)return function(e,t,o,r){let a=e,i=t;return void 0===a.r&&(a=v(e)),void 0===i.r&&(i=v(t)),{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,e.getRadius(),t.getRadius());{const e=null!=o?o:i;if(e)return v(e)}}}function h(e,t,n){const o="string"==typeof e?e:e.value;return o===m.randomColorValue?n?f({value:o}):t?m.randomColorValue:m.midColorValue:f({value:o})}e.r(t),e.d(t,{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 WeakMap;new WeakMap;new WeakMap,new WeakSet;new WeakMap;new WeakMap;new WeakMap;new WeakMap;class y extends class{constructor(e){this.container=e,this.type=0}}{constructor(e){super(e)}isEnabled(){const e=this.container,t=e.interactivity.mouse,n=e.actualOptions.interactivity.events;return n.onHover.enable&&!!t.position&&l("grab",n.onHover.mode)}reset(){}async interact(){var e;const t=this.container,n=t.actualOptions,o=n.interactivity;if(o.events.onHover.enable&&t.interactivity.status===m.mouseMoveEvent){const r=t.interactivity.mouse.position;if(!r)return;const a=t.retina.grabModeDistance,i=t.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!==(e=s.color)&&void 0!==e?e:l.options.links.color;if(!t.particles.grabLineColor){const e=n.interactivity.modes.grab.links;t.particles.grabLineColor=h(d,e.blink,e.consent)}const f=b(l,void 0,t.particles.grabLineColor);if(!f)return;t.canvas.drawGrabLine(l,f,c,r)}}}}}async function M(e){await e.addInteractor("externalGrab",(e=>new y(e)))}return t}()}));
|
|
@@ -1605,20 +1605,20 @@
|
|
|
1605
1605
|
}
|
|
1606
1606
|
}
|
|
1607
1607
|
}
|
|
1608
|
-
externalInteract(delta) {
|
|
1608
|
+
async externalInteract(delta) {
|
|
1609
1609
|
for (const interactor of this.externalInteractors) {
|
|
1610
1610
|
if (interactor.isEnabled()) {
|
|
1611
|
-
interactor.interact(delta);
|
|
1611
|
+
await interactor.interact(delta);
|
|
1612
1612
|
}
|
|
1613
1613
|
}
|
|
1614
1614
|
}
|
|
1615
|
-
particlesInteract(particle, delta) {
|
|
1615
|
+
async particlesInteract(particle, delta) {
|
|
1616
1616
|
for (const interactor of this.externalInteractors) {
|
|
1617
1617
|
interactor.reset(particle);
|
|
1618
1618
|
}
|
|
1619
1619
|
for (const interactor of this.particleInteractors) {
|
|
1620
1620
|
if (interactor.isEnabled(particle)) {
|
|
1621
|
-
interactor.interact(particle, delta);
|
|
1621
|
+
await interactor.interact(particle, delta);
|
|
1622
1622
|
}
|
|
1623
1623
|
}
|
|
1624
1624
|
}
|
|
@@ -4133,10 +4133,10 @@
|
|
|
4133
4133
|
}
|
|
4134
4134
|
container.pathGenerator.init(container);
|
|
4135
4135
|
}
|
|
4136
|
-
redraw() {
|
|
4136
|
+
async redraw() {
|
|
4137
4137
|
this.clear();
|
|
4138
4138
|
this.init();
|
|
4139
|
-
this.draw({
|
|
4139
|
+
await this.draw({
|
|
4140
4140
|
value: 0,
|
|
4141
4141
|
factor: 0
|
|
4142
4142
|
});
|
|
@@ -4161,7 +4161,7 @@
|
|
|
4161
4161
|
remove(particle, group, override) {
|
|
4162
4162
|
this.removeAt(this.array.indexOf(particle), undefined, group, override);
|
|
4163
4163
|
}
|
|
4164
|
-
update(delta) {
|
|
4164
|
+
async update(delta) {
|
|
4165
4165
|
const container = this.container;
|
|
4166
4166
|
const particlesToDelete = [];
|
|
4167
4167
|
container.pathGenerator.update();
|
|
@@ -4195,23 +4195,23 @@
|
|
|
4195
4195
|
for (const particle of particlesToDelete) {
|
|
4196
4196
|
this.remove(particle);
|
|
4197
4197
|
}
|
|
4198
|
-
this.interactionManager.externalInteract(delta);
|
|
4198
|
+
await this.interactionManager.externalInteract(delta);
|
|
4199
4199
|
for (const particle of container.particles.array) {
|
|
4200
4200
|
for (const updater of this.updaters) {
|
|
4201
4201
|
updater.update(particle, delta);
|
|
4202
4202
|
}
|
|
4203
4203
|
if (!particle.destroyed && !particle.spawning) {
|
|
4204
|
-
this.interactionManager.particlesInteract(particle, delta);
|
|
4204
|
+
await this.interactionManager.particlesInteract(particle, delta);
|
|
4205
4205
|
}
|
|
4206
4206
|
}
|
|
4207
4207
|
delete container.canvas.resizeFactor;
|
|
4208
4208
|
}
|
|
4209
|
-
draw(delta) {
|
|
4209
|
+
async draw(delta) {
|
|
4210
4210
|
const container = this.container;
|
|
4211
4211
|
container.canvas.clear();
|
|
4212
4212
|
const canvasSize = this.container.canvas.size;
|
|
4213
4213
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
4214
|
-
this.update(delta);
|
|
4214
|
+
await this.update(delta);
|
|
4215
4215
|
if (this.needsSort) {
|
|
4216
4216
|
this.zArray.sort(((a, b) => b.position.z - a.position.z || a.id - b.id));
|
|
4217
4217
|
this.lastZIndex = this.zArray[this.zArray.length - 1].position.z;
|
|
@@ -4572,12 +4572,12 @@
|
|
|
4572
4572
|
}
|
|
4573
4573
|
draw(force) {
|
|
4574
4574
|
let refreshTime = force;
|
|
4575
|
-
this.drawAnimationFrame = animate()((timestamp => {
|
|
4575
|
+
this.drawAnimationFrame = animate()((async timestamp => {
|
|
4576
4576
|
if (refreshTime) {
|
|
4577
4577
|
this.lastFrameTime = undefined;
|
|
4578
4578
|
refreshTime = false;
|
|
4579
4579
|
}
|
|
4580
|
-
this.drawer.nextFrame(timestamp);
|
|
4580
|
+
await this.drawer.nextFrame(timestamp);
|
|
4581
4581
|
}));
|
|
4582
4582
|
}
|
|
4583
4583
|
getAnimationStatus() {
|
|
@@ -5038,7 +5038,7 @@
|
|
|
5038
5038
|
return Utils_isInArray("repulse", hoverMode) || Utils_isInArray("repulse", clickMode) || divRepulse;
|
|
5039
5039
|
}
|
|
5040
5040
|
reset() {}
|
|
5041
|
-
interact() {
|
|
5041
|
+
async interact() {
|
|
5042
5042
|
const container = this.container, options = container.actualOptions, mouseMoveStatus = container.interactivity.status === Constants_Constants.mouseMoveEvent, events = options.interactivity.events, hoverEnabled = events.onHover.enable, hoverMode = events.onHover.mode, clickEnabled = events.onClick.enable, clickMode = events.onClick.mode, divs = events.onDiv;
|
|
5043
5043
|
if (mouseMoveStatus && hoverEnabled && Utils_isInArray("repulse", hoverMode)) {
|
|
5044
5044
|
this.hoverRepulse();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.41.
|
|
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 WeakMap;new WeakMap;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 WeakMap,new WeakSet;new WeakMap;new WeakMap;new WeakMap;new WeakMap;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}()}));
|
|
1
|
+
/*! tsParticles v1.41.1 by Matteo Bruni */
|
|
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 WeakMap;new WeakMap;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 WeakMap,new WeakSet;new WeakMap;new WeakMap;new WeakMap;new WeakMap;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(){}async 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}()}));
|
|
@@ -1597,20 +1597,20 @@
|
|
|
1597
1597
|
}
|
|
1598
1598
|
}
|
|
1599
1599
|
}
|
|
1600
|
-
externalInteract(delta) {
|
|
1600
|
+
async externalInteract(delta) {
|
|
1601
1601
|
for (const interactor of this.externalInteractors) {
|
|
1602
1602
|
if (interactor.isEnabled()) {
|
|
1603
|
-
interactor.interact(delta);
|
|
1603
|
+
await interactor.interact(delta);
|
|
1604
1604
|
}
|
|
1605
1605
|
}
|
|
1606
1606
|
}
|
|
1607
|
-
particlesInteract(particle, delta) {
|
|
1607
|
+
async particlesInteract(particle, delta) {
|
|
1608
1608
|
for (const interactor of this.externalInteractors) {
|
|
1609
1609
|
interactor.reset(particle);
|
|
1610
1610
|
}
|
|
1611
1611
|
for (const interactor of this.particleInteractors) {
|
|
1612
1612
|
if (interactor.isEnabled(particle)) {
|
|
1613
|
-
interactor.interact(particle, delta);
|
|
1613
|
+
await interactor.interact(particle, delta);
|
|
1614
1614
|
}
|
|
1615
1615
|
}
|
|
1616
1616
|
}
|
|
@@ -4002,10 +4002,10 @@
|
|
|
4002
4002
|
}
|
|
4003
4003
|
container.pathGenerator.init(container);
|
|
4004
4004
|
}
|
|
4005
|
-
redraw() {
|
|
4005
|
+
async redraw() {
|
|
4006
4006
|
this.clear();
|
|
4007
4007
|
this.init();
|
|
4008
|
-
this.draw({
|
|
4008
|
+
await this.draw({
|
|
4009
4009
|
value: 0,
|
|
4010
4010
|
factor: 0
|
|
4011
4011
|
});
|
|
@@ -4030,7 +4030,7 @@
|
|
|
4030
4030
|
remove(particle, group, override) {
|
|
4031
4031
|
this.removeAt(this.array.indexOf(particle), undefined, group, override);
|
|
4032
4032
|
}
|
|
4033
|
-
update(delta) {
|
|
4033
|
+
async update(delta) {
|
|
4034
4034
|
const container = this.container;
|
|
4035
4035
|
const particlesToDelete = [];
|
|
4036
4036
|
container.pathGenerator.update();
|
|
@@ -4064,23 +4064,23 @@
|
|
|
4064
4064
|
for (const particle of particlesToDelete) {
|
|
4065
4065
|
this.remove(particle);
|
|
4066
4066
|
}
|
|
4067
|
-
this.interactionManager.externalInteract(delta);
|
|
4067
|
+
await this.interactionManager.externalInteract(delta);
|
|
4068
4068
|
for (const particle of container.particles.array) {
|
|
4069
4069
|
for (const updater of this.updaters) {
|
|
4070
4070
|
updater.update(particle, delta);
|
|
4071
4071
|
}
|
|
4072
4072
|
if (!particle.destroyed && !particle.spawning) {
|
|
4073
|
-
this.interactionManager.particlesInteract(particle, delta);
|
|
4073
|
+
await this.interactionManager.particlesInteract(particle, delta);
|
|
4074
4074
|
}
|
|
4075
4075
|
}
|
|
4076
4076
|
delete container.canvas.resizeFactor;
|
|
4077
4077
|
}
|
|
4078
|
-
draw(delta) {
|
|
4078
|
+
async draw(delta) {
|
|
4079
4079
|
const container = this.container;
|
|
4080
4080
|
container.canvas.clear();
|
|
4081
4081
|
const canvasSize = this.container.canvas.size;
|
|
4082
4082
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
4083
|
-
this.update(delta);
|
|
4083
|
+
await this.update(delta);
|
|
4084
4084
|
if (this.needsSort) {
|
|
4085
4085
|
this.zArray.sort(((a, b) => b.position.z - a.position.z || a.id - b.id));
|
|
4086
4086
|
this.lastZIndex = this.zArray[this.zArray.length - 1].position.z;
|
|
@@ -4441,12 +4441,12 @@
|
|
|
4441
4441
|
}
|
|
4442
4442
|
draw(force) {
|
|
4443
4443
|
let refreshTime = force;
|
|
4444
|
-
this.drawAnimationFrame = animate()((timestamp => {
|
|
4444
|
+
this.drawAnimationFrame = animate()((async timestamp => {
|
|
4445
4445
|
if (refreshTime) {
|
|
4446
4446
|
this.lastFrameTime = undefined;
|
|
4447
4447
|
refreshTime = false;
|
|
4448
4448
|
}
|
|
4449
|
-
this.drawer.nextFrame(timestamp);
|
|
4449
|
+
await this.drawer.nextFrame(timestamp);
|
|
4450
4450
|
}));
|
|
4451
4451
|
}
|
|
4452
4452
|
getAnimationStatus() {
|
|
@@ -4899,7 +4899,7 @@
|
|
|
4899
4899
|
super(container);
|
|
4900
4900
|
this.delay = 0;
|
|
4901
4901
|
}
|
|
4902
|
-
interact(delta) {
|
|
4902
|
+
async interact(delta) {
|
|
4903
4903
|
var _a, _b, _c, _d;
|
|
4904
4904
|
if (!this.container.retina.reduceFactor) {
|
|
4905
4905
|
return;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.41.
|
|
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 i in o)("object"==typeof exports?exports:e)[i]=o[i]}}(window,(function(){return function(){"use strict";var e={d:function(t,o){for(var i in o)e.o(o,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:o[i]})},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){return e===t||t instanceof Array&&t.indexOf(e)>-1}e.r(t),e.d(t,{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 WeakMap;new WeakMap;new WeakMap,new WeakSet;new WeakMap;new WeakMap;new WeakMap;new WeakMap;class n extends class{constructor(e){this.container=e,this.type=0}}{constructor(e){super(e),this.delay=0}interact(e){var t,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+=e.value),this.delay<s)return;let u=!0;r.pauseOnStop&&(a.interactivity.mouse.position===this.lastPosition||(null===(t=a.interactivity.mouse.position)||void 0===t?void 0:t.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 e=this.container,t=e.actualOptions,i=e.interactivity.mouse,n=t.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(e){await e.addInteractor("externalTrail",(e=>new n(e)))}return t}()}));
|
|
1
|
+
/*! tsParticles v1.41.1 by Matteo Bruni */
|
|
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 i in o)("object"==typeof exports?exports:e)[i]=o[i]}}(window,(function(){return function(){"use strict";var e={d:function(t,o){for(var i in o)e.o(o,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:o[i]})},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){return e===t||t instanceof Array&&t.indexOf(e)>-1}e.r(t),e.d(t,{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 WeakMap;new WeakMap;new WeakMap,new WeakSet;new WeakMap;new WeakMap;new WeakMap;new WeakMap;class n extends class{constructor(e){this.container=e,this.type=0}}{constructor(e){super(e),this.delay=0}async interact(e){var t,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+=e.value),this.delay<s)return;let u=!0;r.pauseOnStop&&(a.interactivity.mouse.position===this.lastPosition||(null===(t=a.interactivity.mouse.position)||void 0===t?void 0:t.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 e=this.container,t=e.actualOptions,i=e.interactivity.mouse,n=t.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(e){await e.addInteractor("externalTrail",(e=>new n(e)))}return t}()}));
|
|
@@ -1591,20 +1591,20 @@
|
|
|
1591
1591
|
}
|
|
1592
1592
|
}
|
|
1593
1593
|
}
|
|
1594
|
-
externalInteract(delta) {
|
|
1594
|
+
async externalInteract(delta) {
|
|
1595
1595
|
for (const interactor of this.externalInteractors) {
|
|
1596
1596
|
if (interactor.isEnabled()) {
|
|
1597
|
-
interactor.interact(delta);
|
|
1597
|
+
await interactor.interact(delta);
|
|
1598
1598
|
}
|
|
1599
1599
|
}
|
|
1600
1600
|
}
|
|
1601
|
-
particlesInteract(particle, delta) {
|
|
1601
|
+
async particlesInteract(particle, delta) {
|
|
1602
1602
|
for (const interactor of this.externalInteractors) {
|
|
1603
1603
|
interactor.reset(particle);
|
|
1604
1604
|
}
|
|
1605
1605
|
for (const interactor of this.particleInteractors) {
|
|
1606
1606
|
if (interactor.isEnabled(particle)) {
|
|
1607
|
-
interactor.interact(particle, delta);
|
|
1607
|
+
await interactor.interact(particle, delta);
|
|
1608
1608
|
}
|
|
1609
1609
|
}
|
|
1610
1610
|
}
|
|
@@ -4002,10 +4002,10 @@
|
|
|
4002
4002
|
}
|
|
4003
4003
|
container.pathGenerator.init(container);
|
|
4004
4004
|
}
|
|
4005
|
-
redraw() {
|
|
4005
|
+
async redraw() {
|
|
4006
4006
|
this.clear();
|
|
4007
4007
|
this.init();
|
|
4008
|
-
this.draw({
|
|
4008
|
+
await this.draw({
|
|
4009
4009
|
value: 0,
|
|
4010
4010
|
factor: 0
|
|
4011
4011
|
});
|
|
@@ -4030,7 +4030,7 @@
|
|
|
4030
4030
|
remove(particle, group, override) {
|
|
4031
4031
|
this.removeAt(this.array.indexOf(particle), undefined, group, override);
|
|
4032
4032
|
}
|
|
4033
|
-
update(delta) {
|
|
4033
|
+
async update(delta) {
|
|
4034
4034
|
const container = this.container;
|
|
4035
4035
|
const particlesToDelete = [];
|
|
4036
4036
|
container.pathGenerator.update();
|
|
@@ -4064,23 +4064,23 @@
|
|
|
4064
4064
|
for (const particle of particlesToDelete) {
|
|
4065
4065
|
this.remove(particle);
|
|
4066
4066
|
}
|
|
4067
|
-
this.interactionManager.externalInteract(delta);
|
|
4067
|
+
await this.interactionManager.externalInteract(delta);
|
|
4068
4068
|
for (const particle of container.particles.array) {
|
|
4069
4069
|
for (const updater of this.updaters) {
|
|
4070
4070
|
updater.update(particle, delta);
|
|
4071
4071
|
}
|
|
4072
4072
|
if (!particle.destroyed && !particle.spawning) {
|
|
4073
|
-
this.interactionManager.particlesInteract(particle, delta);
|
|
4073
|
+
await this.interactionManager.particlesInteract(particle, delta);
|
|
4074
4074
|
}
|
|
4075
4075
|
}
|
|
4076
4076
|
delete container.canvas.resizeFactor;
|
|
4077
4077
|
}
|
|
4078
|
-
draw(delta) {
|
|
4078
|
+
async draw(delta) {
|
|
4079
4079
|
const container = this.container;
|
|
4080
4080
|
container.canvas.clear();
|
|
4081
4081
|
const canvasSize = this.container.canvas.size;
|
|
4082
4082
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
4083
|
-
this.update(delta);
|
|
4083
|
+
await this.update(delta);
|
|
4084
4084
|
if (this.needsSort) {
|
|
4085
4085
|
this.zArray.sort(((a, b) => b.position.z - a.position.z || a.id - b.id));
|
|
4086
4086
|
this.lastZIndex = this.zArray[this.zArray.length - 1].position.z;
|
|
@@ -4441,12 +4441,12 @@
|
|
|
4441
4441
|
}
|
|
4442
4442
|
draw(force) {
|
|
4443
4443
|
let refreshTime = force;
|
|
4444
|
-
this.drawAnimationFrame = animate()((timestamp => {
|
|
4444
|
+
this.drawAnimationFrame = animate()((async timestamp => {
|
|
4445
4445
|
if (refreshTime) {
|
|
4446
4446
|
this.lastFrameTime = undefined;
|
|
4447
4447
|
refreshTime = false;
|
|
4448
4448
|
}
|
|
4449
|
-
this.drawer.nextFrame(timestamp);
|
|
4449
|
+
await this.drawer.nextFrame(timestamp);
|
|
4450
4450
|
}));
|
|
4451
4451
|
}
|
|
4452
4452
|
getAnimationStatus() {
|
|
@@ -4898,7 +4898,7 @@
|
|
|
4898
4898
|
constructor(container) {
|
|
4899
4899
|
super(container);
|
|
4900
4900
|
}
|
|
4901
|
-
interact(p1) {
|
|
4901
|
+
async interact(p1) {
|
|
4902
4902
|
var _a;
|
|
4903
4903
|
const container = this.container, distance = (_a = p1.retina.attractDistance) !== null && _a !== void 0 ? _a : container.retina.attractDistance, pos1 = p1.getPosition(), query = container.particles.quadTree.queryCircle(pos1, distance);
|
|
4904
4904
|
for (const p2 of query) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.41.
|
|
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 WeakMap;new WeakMap;new WeakMap,new WeakSet;new WeakMap;new WeakMap;new WeakMap;new WeakMap;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}()}));
|
|
1
|
+
/*! tsParticles v1.41.1 by Matteo Bruni */
|
|
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 WeakMap;new WeakMap;new WeakMap,new WeakSet;new WeakMap;new WeakMap;new WeakMap;new WeakMap;class a extends class{constructor(e){this.container=e,this.type=1}}{constructor(e){super(e)}async 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}()}));
|
|
@@ -544,20 +544,20 @@
|
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
|
-
externalInteract(delta) {
|
|
547
|
+
async externalInteract(delta) {
|
|
548
548
|
for (const interactor of this.externalInteractors) {
|
|
549
549
|
if (interactor.isEnabled()) {
|
|
550
|
-
interactor.interact(delta);
|
|
550
|
+
await interactor.interact(delta);
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
|
-
particlesInteract(particle, delta) {
|
|
554
|
+
async particlesInteract(particle, delta) {
|
|
555
555
|
for (const interactor of this.externalInteractors) {
|
|
556
556
|
interactor.reset(particle);
|
|
557
557
|
}
|
|
558
558
|
for (const interactor of this.particleInteractors) {
|
|
559
559
|
if (interactor.isEnabled(particle)) {
|
|
560
|
-
interactor.interact(particle, delta);
|
|
560
|
+
await interactor.interact(particle, delta);
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
563
|
}
|
|
@@ -3046,10 +3046,10 @@
|
|
|
3046
3046
|
}
|
|
3047
3047
|
container.pathGenerator.init(container);
|
|
3048
3048
|
}
|
|
3049
|
-
redraw() {
|
|
3049
|
+
async redraw() {
|
|
3050
3050
|
this.clear();
|
|
3051
3051
|
this.init();
|
|
3052
|
-
this.draw({
|
|
3052
|
+
await this.draw({
|
|
3053
3053
|
value: 0,
|
|
3054
3054
|
factor: 0
|
|
3055
3055
|
});
|
|
@@ -3074,7 +3074,7 @@
|
|
|
3074
3074
|
remove(particle, group, override) {
|
|
3075
3075
|
this.removeAt(this.array.indexOf(particle), undefined, group, override);
|
|
3076
3076
|
}
|
|
3077
|
-
update(delta) {
|
|
3077
|
+
async update(delta) {
|
|
3078
3078
|
const container = this.container;
|
|
3079
3079
|
const particlesToDelete = [];
|
|
3080
3080
|
container.pathGenerator.update();
|
|
@@ -3108,23 +3108,23 @@
|
|
|
3108
3108
|
for (const particle of particlesToDelete) {
|
|
3109
3109
|
this.remove(particle);
|
|
3110
3110
|
}
|
|
3111
|
-
this.interactionManager.externalInteract(delta);
|
|
3111
|
+
await this.interactionManager.externalInteract(delta);
|
|
3112
3112
|
for (const particle of container.particles.array) {
|
|
3113
3113
|
for (const updater of this.updaters) {
|
|
3114
3114
|
updater.update(particle, delta);
|
|
3115
3115
|
}
|
|
3116
3116
|
if (!particle.destroyed && !particle.spawning) {
|
|
3117
|
-
this.interactionManager.particlesInteract(particle, delta);
|
|
3117
|
+
await this.interactionManager.particlesInteract(particle, delta);
|
|
3118
3118
|
}
|
|
3119
3119
|
}
|
|
3120
3120
|
delete container.canvas.resizeFactor;
|
|
3121
3121
|
}
|
|
3122
|
-
draw(delta) {
|
|
3122
|
+
async draw(delta) {
|
|
3123
3123
|
const container = this.container;
|
|
3124
3124
|
container.canvas.clear();
|
|
3125
3125
|
const canvasSize = this.container.canvas.size;
|
|
3126
3126
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
3127
|
-
this.update(delta);
|
|
3127
|
+
await this.update(delta);
|
|
3128
3128
|
if (this.needsSort) {
|
|
3129
3129
|
this.zArray.sort(((a, b) => b.position.z - a.position.z || a.id - b.id));
|
|
3130
3130
|
this.lastZIndex = this.zArray[this.zArray.length - 1].position.z;
|
|
@@ -3485,12 +3485,12 @@
|
|
|
3485
3485
|
}
|
|
3486
3486
|
draw(force) {
|
|
3487
3487
|
let refreshTime = force;
|
|
3488
|
-
this.drawAnimationFrame = animate()((timestamp => {
|
|
3488
|
+
this.drawAnimationFrame = animate()((async timestamp => {
|
|
3489
3489
|
if (refreshTime) {
|
|
3490
3490
|
this.lastFrameTime = undefined;
|
|
3491
3491
|
refreshTime = false;
|
|
3492
3492
|
}
|
|
3493
|
-
this.drawer.nextFrame(timestamp);
|
|
3493
|
+
await this.drawer.nextFrame(timestamp);
|
|
3494
3494
|
}));
|
|
3495
3495
|
}
|
|
3496
3496
|
getAnimationStatus() {
|
|
@@ -5012,7 +5012,7 @@
|
|
|
5012
5012
|
return particle.options.collisions.enable;
|
|
5013
5013
|
}
|
|
5014
5014
|
reset() {}
|
|
5015
|
-
interact(p1) {
|
|
5015
|
+
async interact(p1) {
|
|
5016
5016
|
const container = this.container;
|
|
5017
5017
|
const pos1 = p1.getPosition();
|
|
5018
5018
|
const radius1 = p1.getRadius();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.41.
|
|
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 WeakMap;new WeakMap;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 WeakMap,new WeakSet;new WeakMap;new WeakMap;new WeakMap;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))}new WeakMap;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}()}));
|
|
1
|
+
/*! tsParticles v1.41.1 by Matteo Bruni */
|
|
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 WeakMap;new WeakMap;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 WeakMap,new WeakSet;new WeakMap;new WeakMap;new WeakMap;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))}new WeakMap;class f extends class{constructor(t){this.container=t,this.type=1}}{constructor(t){super(t)}isEnabled(t){return t.options.collisions.enable}reset(){}async 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}()}));
|
|
@@ -1631,20 +1631,20 @@
|
|
|
1631
1631
|
}
|
|
1632
1632
|
}
|
|
1633
1633
|
}
|
|
1634
|
-
externalInteract(delta) {
|
|
1634
|
+
async externalInteract(delta) {
|
|
1635
1635
|
for (const interactor of this.externalInteractors) {
|
|
1636
1636
|
if (interactor.isEnabled()) {
|
|
1637
|
-
interactor.interact(delta);
|
|
1637
|
+
await interactor.interact(delta);
|
|
1638
1638
|
}
|
|
1639
1639
|
}
|
|
1640
1640
|
}
|
|
1641
|
-
particlesInteract(particle, delta) {
|
|
1641
|
+
async particlesInteract(particle, delta) {
|
|
1642
1642
|
for (const interactor of this.externalInteractors) {
|
|
1643
1643
|
interactor.reset(particle);
|
|
1644
1644
|
}
|
|
1645
1645
|
for (const interactor of this.particleInteractors) {
|
|
1646
1646
|
if (interactor.isEnabled(particle)) {
|
|
1647
|
-
interactor.interact(particle, delta);
|
|
1647
|
+
await interactor.interact(particle, delta);
|
|
1648
1648
|
}
|
|
1649
1649
|
}
|
|
1650
1650
|
}
|
|
@@ -4042,10 +4042,10 @@
|
|
|
4042
4042
|
}
|
|
4043
4043
|
container.pathGenerator.init(container);
|
|
4044
4044
|
}
|
|
4045
|
-
redraw() {
|
|
4045
|
+
async redraw() {
|
|
4046
4046
|
this.clear();
|
|
4047
4047
|
this.init();
|
|
4048
|
-
this.draw({
|
|
4048
|
+
await this.draw({
|
|
4049
4049
|
value: 0,
|
|
4050
4050
|
factor: 0
|
|
4051
4051
|
});
|
|
@@ -4070,7 +4070,7 @@
|
|
|
4070
4070
|
remove(particle, group, override) {
|
|
4071
4071
|
this.removeAt(this.array.indexOf(particle), undefined, group, override);
|
|
4072
4072
|
}
|
|
4073
|
-
update(delta) {
|
|
4073
|
+
async update(delta) {
|
|
4074
4074
|
const container = this.container;
|
|
4075
4075
|
const particlesToDelete = [];
|
|
4076
4076
|
container.pathGenerator.update();
|
|
@@ -4104,23 +4104,23 @@
|
|
|
4104
4104
|
for (const particle of particlesToDelete) {
|
|
4105
4105
|
this.remove(particle);
|
|
4106
4106
|
}
|
|
4107
|
-
this.interactionManager.externalInteract(delta);
|
|
4107
|
+
await this.interactionManager.externalInteract(delta);
|
|
4108
4108
|
for (const particle of container.particles.array) {
|
|
4109
4109
|
for (const updater of this.updaters) {
|
|
4110
4110
|
updater.update(particle, delta);
|
|
4111
4111
|
}
|
|
4112
4112
|
if (!particle.destroyed && !particle.spawning) {
|
|
4113
|
-
this.interactionManager.particlesInteract(particle, delta);
|
|
4113
|
+
await this.interactionManager.particlesInteract(particle, delta);
|
|
4114
4114
|
}
|
|
4115
4115
|
}
|
|
4116
4116
|
delete container.canvas.resizeFactor;
|
|
4117
4117
|
}
|
|
4118
|
-
draw(delta) {
|
|
4118
|
+
async draw(delta) {
|
|
4119
4119
|
const container = this.container;
|
|
4120
4120
|
container.canvas.clear();
|
|
4121
4121
|
const canvasSize = this.container.canvas.size;
|
|
4122
4122
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
4123
|
-
this.update(delta);
|
|
4123
|
+
await this.update(delta);
|
|
4124
4124
|
if (this.needsSort) {
|
|
4125
4125
|
this.zArray.sort(((a, b) => b.position.z - a.position.z || a.id - b.id));
|
|
4126
4126
|
this.lastZIndex = this.zArray[this.zArray.length - 1].position.z;
|
|
@@ -4481,12 +4481,12 @@
|
|
|
4481
4481
|
}
|
|
4482
4482
|
draw(force) {
|
|
4483
4483
|
let refreshTime = force;
|
|
4484
|
-
this.drawAnimationFrame = animate()((timestamp => {
|
|
4484
|
+
this.drawAnimationFrame = animate()((async timestamp => {
|
|
4485
4485
|
if (refreshTime) {
|
|
4486
4486
|
this.lastFrameTime = undefined;
|
|
4487
4487
|
refreshTime = false;
|
|
4488
4488
|
}
|
|
4489
|
-
this.drawer.nextFrame(timestamp);
|
|
4489
|
+
await this.drawer.nextFrame(timestamp);
|
|
4490
4490
|
}));
|
|
4491
4491
|
}
|
|
4492
4492
|
getAnimationStatus() {
|
|
@@ -4970,7 +4970,7 @@
|
|
|
4970
4970
|
return particle.options.links.enable;
|
|
4971
4971
|
}
|
|
4972
4972
|
reset() {}
|
|
4973
|
-
interact(p1) {
|
|
4973
|
+
async interact(p1) {
|
|
4974
4974
|
var _a;
|
|
4975
4975
|
p1.links = [];
|
|
4976
4976
|
const pos1 = p1.getPosition();
|