tsparticles 1.42.1 → 1.42.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Core/Canvas.d.ts +1 -1
- package/Core/Canvas.js +16 -7
- package/Core/Particles.js +2 -3
- package/browser/Core/Canvas.d.ts +1 -1
- package/browser/Core/Canvas.js +16 -7
- package/browser/Core/Particles.js +2 -3
- package/esm/Core/Canvas.d.ts +1 -1
- package/esm/Core/Canvas.js +16 -7
- package/esm/Core/Particles.js +2 -3
- package/package.json +15 -3
- package/report.html +2 -2
- package/report.slim.html +2 -2
- package/tsparticles.engine.js +15 -10
- package/tsparticles.engine.min.js +2 -2
- package/tsparticles.interaction.external.attract.js +15 -10
- package/tsparticles.interaction.external.attract.min.js +1 -1
- package/tsparticles.interaction.external.bounce.js +15 -10
- package/tsparticles.interaction.external.bounce.min.js +1 -1
- package/tsparticles.interaction.external.bubble.js +15 -10
- package/tsparticles.interaction.external.bubble.min.js +1 -1
- package/tsparticles.interaction.external.connect.js +15 -10
- package/tsparticles.interaction.external.connect.min.js +1 -1
- package/tsparticles.interaction.external.grab.js +15 -10
- package/tsparticles.interaction.external.grab.min.js +1 -1
- package/tsparticles.interaction.external.repulse.js +15 -10
- package/tsparticles.interaction.external.repulse.min.js +1 -1
- package/tsparticles.interaction.external.trail.js +15 -10
- package/tsparticles.interaction.external.trail.min.js +1 -1
- package/tsparticles.interaction.particles.attract.js +15 -10
- package/tsparticles.interaction.particles.attract.min.js +1 -1
- package/tsparticles.interaction.particles.collisions.js +15 -10
- package/tsparticles.interaction.particles.collisions.min.js +1 -1
- package/tsparticles.interaction.particles.links.js +15 -10
- package/tsparticles.interaction.particles.links.min.js +1 -1
- package/tsparticles.js +15 -10
- package/tsparticles.min.js +2 -2
- package/tsparticles.pathseg.min.js +1 -1
- package/tsparticles.plugins.absorbers.js +15 -10
- package/tsparticles.plugins.absorbers.min.js +1 -1
- package/tsparticles.plugins.emitters.js +15 -10
- package/tsparticles.plugins.emitters.min.js +1 -1
- package/tsparticles.plugins.polygonMask.js +15 -10
- package/tsparticles.plugins.polygonMask.min.js +1 -1
- package/tsparticles.shape.circle.min.js +1 -1
- package/tsparticles.shape.image.js +15 -10
- 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 +15 -10
- package/tsparticles.shape.text.min.js +1 -1
- package/tsparticles.slim.js +15 -10
- package/tsparticles.slim.min.js +2 -2
- package/tsparticles.updater.angle.js +15 -10
- package/tsparticles.updater.angle.min.js +1 -1
- package/tsparticles.updater.color.js +15 -10
- package/tsparticles.updater.color.min.js +1 -1
- package/tsparticles.updater.life.js +15 -10
- package/tsparticles.updater.life.min.js +1 -1
- package/tsparticles.updater.opacity.js +15 -10
- package/tsparticles.updater.opacity.min.js +1 -1
- package/tsparticles.updater.outModes.js +15 -10
- package/tsparticles.updater.outModes.min.js +1 -1
- package/tsparticles.updater.roll.js +15 -10
- package/tsparticles.updater.roll.min.js +1 -1
- package/tsparticles.updater.size.js +15 -10
- package/tsparticles.updater.size.min.js +1 -1
- package/tsparticles.updater.strokeColor.js +15 -10
- package/tsparticles.updater.strokeColor.min.js +1 -1
- package/tsparticles.updater.tilt.js +15 -10
- package/tsparticles.updater.tilt.min.js +1 -1
- package/tsparticles.updater.wobble.js +15 -10
- package/tsparticles.updater.wobble.min.js +1 -1
- package/umd/Core/Canvas.d.ts +1 -1
- package/umd/Core/Canvas.js +16 -7
- package/umd/Core/Particles.js +2 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.4 by Matteo Bruni */
|
|
2
2
|
"use strict";(window.webpackChunktsparticles=window.webpackChunktsparticles||[]).push([[404],{167:function(){!function(){try{if("undefined"==typeof window)return;"SVGPathSeg"in window||(window.SVGPathSeg=function(t,e,n){this.pathSegType=t,this.pathSegTypeAsLetter=e,this._owningPathSegList=n},window.SVGPathSeg.prototype.classname="SVGPathSeg",window.SVGPathSeg.PATHSEG_UNKNOWN=0,window.SVGPathSeg.PATHSEG_CLOSEPATH=1,window.SVGPathSeg.PATHSEG_MOVETO_ABS=2,window.SVGPathSeg.PATHSEG_MOVETO_REL=3,window.SVGPathSeg.PATHSEG_LINETO_ABS=4,window.SVGPathSeg.PATHSEG_LINETO_REL=5,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS=6,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL=7,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS=8,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL=9,window.SVGPathSeg.PATHSEG_ARC_ABS=10,window.SVGPathSeg.PATHSEG_ARC_REL=11,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS=12,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL=13,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS=14,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL=15,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS=16,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL=17,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS=18,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL=19,window.SVGPathSeg.prototype._segmentChanged=function(){this._owningPathSegList&&this._owningPathSegList.segmentChanged(this)},window.SVGPathSegClosePath=function(t){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CLOSEPATH,"z",t)},window.SVGPathSegClosePath.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegClosePath.prototype.toString=function(){return"[object SVGPathSegClosePath]"},window.SVGPathSegClosePath.prototype._asPathString=function(){return this.pathSegTypeAsLetter},window.SVGPathSegClosePath.prototype.clone=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathSegMovetoAbs=function(t,e,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_ABS,"M",t),this._x=e,this._y=n},window.SVGPathSegMovetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoAbs.prototype.toString=function(){return"[object SVGPathSegMovetoAbs]"},window.SVGPathSegMovetoAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegMovetoAbs.prototype.clone=function(){return new window.SVGPathSegMovetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegMovetoRel=function(t,e,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_REL,"m",t),this._x=e,this._y=n},window.SVGPathSegMovetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoRel.prototype.toString=function(){return"[object SVGPathSegMovetoRel]"},window.SVGPathSegMovetoRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegMovetoRel.prototype.clone=function(){return new window.SVGPathSegMovetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoAbs=function(t,e,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_ABS,"L",t),this._x=e,this._y=n},window.SVGPathSegLinetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoAbs.prototype.toString=function(){return"[object SVGPathSegLinetoAbs]"},window.SVGPathSegLinetoAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegLinetoAbs.prototype.clone=function(){return new window.SVGPathSegLinetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoRel=function(t,e,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_REL,"l",t),this._x=e,this._y=n},window.SVGPathSegLinetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoRel.prototype.toString=function(){return"[object SVGPathSegLinetoRel]"},window.SVGPathSegLinetoRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegLinetoRel.prototype.clone=function(){return new window.SVGPathSegLinetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicAbs=function(t,e,n,i,o,r,h){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS,"C",t),this._x=e,this._y=n,this._x1=i,this._y1=o,this._x2=r,this._y2=h},window.SVGPathSegCurvetoCubicAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicAbs]"},window.SVGPathSegCurvetoCubicAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},window.SVGPathSegCurvetoCubicAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicAbs(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicRel=function(t,e,n,i,o,r,h){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL,"c",t),this._x=e,this._y=n,this._x1=i,this._y1=o,this._x2=r,this._y2=h},window.SVGPathSegCurvetoCubicRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicRel]"},window.SVGPathSegCurvetoCubicRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},window.SVGPathSegCurvetoCubicRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicRel(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticAbs=function(t,e,n,i,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS,"Q",t),this._x=e,this._y=n,this._x1=i,this._y1=o},window.SVGPathSegCurvetoQuadraticAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticAbs]"},window.SVGPathSegCurvetoQuadraticAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x+" "+this._y},window.SVGPathSegCurvetoQuadraticAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticRel=function(t,e,n,i,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL,"q",t),this._x=e,this._y=n,this._x1=i,this._y1=o},window.SVGPathSegCurvetoQuadraticRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticRel]"},window.SVGPathSegCurvetoQuadraticRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x+" "+this._y},window.SVGPathSegCurvetoQuadraticRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticRel(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcAbs=function(t,e,n,i,o,r,h,s){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_ABS,"A",t),this._x=e,this._y=n,this._r1=i,this._r2=o,this._angle=r,this._largeArcFlag=h,this._sweepFlag=s},window.SVGPathSegArcAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcAbs.prototype.toString=function(){return"[object SVGPathSegArcAbs]"},window.SVGPathSegArcAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._r1+" "+this._r2+" "+this._angle+" "+(this._largeArcFlag?"1":"0")+" "+(this._sweepFlag?"1":"0")+" "+this._x+" "+this._y},window.SVGPathSegArcAbs.prototype.clone=function(){return new window.SVGPathSegArcAbs(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"r1",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"r2",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcRel=function(t,e,n,i,o,r,h,s){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_REL,"a",t),this._x=e,this._y=n,this._r1=i,this._r2=o,this._angle=r,this._largeArcFlag=h,this._sweepFlag=s},window.SVGPathSegArcRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcRel.prototype.toString=function(){return"[object SVGPathSegArcRel]"},window.SVGPathSegArcRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._r1+" "+this._r2+" "+this._angle+" "+(this._largeArcFlag?"1":"0")+" "+(this._sweepFlag?"1":"0")+" "+this._x+" "+this._y},window.SVGPathSegArcRel.prototype.clone=function(){return new window.SVGPathSegArcRel(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"r1",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"r2",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS,"H",t),this._x=e},window.SVGPathSegLinetoHorizontalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalAbs]"},window.SVGPathSegLinetoHorizontalAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x},window.SVGPathSegLinetoHorizontalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalAbs(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL,"h",t),this._x=e},window.SVGPathSegLinetoHorizontalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalRel.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalRel]"},window.SVGPathSegLinetoHorizontalRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x},window.SVGPathSegLinetoHorizontalRel.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalRel(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS,"V",t),this._y=e},window.SVGPathSegLinetoVerticalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalAbs]"},window.SVGPathSegLinetoVerticalAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._y},window.SVGPathSegLinetoVerticalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalAbs(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL,"v",t),this._y=e},window.SVGPathSegLinetoVerticalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalRel.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalRel]"},window.SVGPathSegLinetoVerticalRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._y},window.SVGPathSegLinetoVerticalRel.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalRel(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothAbs=function(t,e,n,i,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS,"S",t),this._x=e,this._y=n,this._x2=i,this._y2=o},window.SVGPathSegCurvetoCubicSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothAbs]"},window.SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},window.SVGPathSegCurvetoCubicSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothRel=function(t,e,n,i,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL,"s",t),this._x=e,this._y=n,this._x2=i,this._y2=o},window.SVGPathSegCurvetoCubicSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothRel]"},window.SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},window.SVGPathSegCurvetoCubicSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothAbs=function(t,e,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS,"T",t),this._x=e,this._y=n},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothAbs]"},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothRel=function(t,e,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,"t",t),this._x=e,this._y=n},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothRel]"},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathElement.prototype.createSVGPathSegClosePath=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathElement.prototype.createSVGPathSegMovetoAbs=function(t,e){return new window.SVGPathSegMovetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegMovetoRel=function(t,e){return new window.SVGPathSegMovetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoAbs=function(t,e){return new window.SVGPathSegLinetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoRel=function(t,e){return new window.SVGPathSegLinetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs=function(t,e,n,i,o,r){return new window.SVGPathSegCurvetoCubicAbs(void 0,t,e,n,i,o,r)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel=function(t,e,n,i,o,r){return new window.SVGPathSegCurvetoCubicRel(void 0,t,e,n,i,o,r)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs=function(t,e,n,i){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,t,e,n,i)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel=function(t,e,n,i){return new window.SVGPathSegCurvetoQuadraticRel(void 0,t,e,n,i)},window.SVGPathElement.prototype.createSVGPathSegArcAbs=function(t,e,n,i,o,r,h){return new window.SVGPathSegArcAbs(void 0,t,e,n,i,o,r,h)},window.SVGPathElement.prototype.createSVGPathSegArcRel=function(t,e,n,i,o,r,h){return new window.SVGPathSegArcRel(void 0,t,e,n,i,o,r,h)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs=function(t){return new window.SVGPathSegLinetoHorizontalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel=function(t){return new window.SVGPathSegLinetoHorizontalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs=function(t){return new window.SVGPathSegLinetoVerticalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel=function(t){return new window.SVGPathSegLinetoVerticalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs=function(t,e,n,i){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,t,e,n,i)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel=function(t,e,n,i){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,t,e,n,i)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,t,e)},"getPathSegAtLength"in window.SVGPathElement.prototype||(window.SVGPathElement.prototype.getPathSegAtLength=function(t){if(void 0===t||!isFinite(t))throw"Invalid arguments.";const e=document.createElementNS("http://www.w3.org/2000/svg","path");e.setAttribute("d",this.getAttribute("d"));let n=e.pathSegList.numberOfItems-1;if(n<=0)return 0;do{if(e.pathSegList.removeItem(n),t>e.getTotalLength())break;n--}while(n>0);return n})),"SVGPathSegList"in window&&"appendItem"in window.SVGPathSegList.prototype||(window.SVGPathSegList=function(t){this._pathElement=t,this._list=this._parsePath(this._pathElement.getAttribute("d")),this._mutationObserverConfig={attributes:!0,attributeFilter:["d"]},this._pathElementMutationObserver=new MutationObserver(this._updateListFromPathMutations.bind(this)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.classname="SVGPathSegList",Object.defineProperty(window.SVGPathSegList.prototype,"numberOfItems",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathSegList.prototype,"length",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"pathSegList",{get:function(){return this._pathSegList||(this._pathSegList=new window.SVGPathSegList(this)),this._pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"normalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedNormalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),window.SVGPathSegList.prototype._checkPathSynchronizedToList=function(){this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords())},window.SVGPathSegList.prototype._updateListFromPathMutations=function(t){if(!this._pathElement)return;let e=!1;t.forEach((function(t){"d"==t.attributeName&&(e=!0)})),e&&(this._list=this._parsePath(this._pathElement.getAttribute("d")))},window.SVGPathSegList.prototype._writeListToPath=function(){this._pathElementMutationObserver.disconnect(),this._pathElement.setAttribute("d",window.SVGPathSegList._pathSegArrayAsString(this._list)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.segmentChanged=function(t){this._writeListToPath()},window.SVGPathSegList.prototype.clear=function(){this._checkPathSynchronizedToList(),this._list.forEach((function(t){t._owningPathSegList=null})),this._list=[],this._writeListToPath()},window.SVGPathSegList.prototype.initialize=function(t){return this._checkPathSynchronizedToList(),this._list=[t],t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype._checkValidIndex=function(t){if(isNaN(t)||t<0||t>=this.numberOfItems)throw"INDEX_SIZE_ERR"},window.SVGPathSegList.prototype.getItem=function(t){return this._checkPathSynchronizedToList(),this._checkValidIndex(t),this._list[t]},window.SVGPathSegList.prototype.insertItemBefore=function(t,e){return this._checkPathSynchronizedToList(),e>this.numberOfItems&&(e=this.numberOfItems),t._owningPathSegList&&(t=t.clone()),this._list.splice(e,0,t),t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype.replaceItem=function(t,e){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._checkValidIndex(e),this._list[e]=t,t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype.removeItem=function(t){this._checkPathSynchronizedToList(),this._checkValidIndex(t);const e=this._list[t];return this._list.splice(t,1),this._writeListToPath(),e},window.SVGPathSegList.prototype.appendItem=function(t){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._list.push(t),t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList._pathSegArrayAsString=function(t){let e="",n=!0;return t.forEach((function(t){n?(n=!1,e+=t._asPathString()):e+=" "+t._asPathString()})),e},window.SVGPathSegList.prototype._parsePath=function(t){if(!t||0==t.length)return[];const e=this,n=function(){this.pathSegList=[]};n.prototype.appendSegment=function(t){this.pathSegList.push(t)};const i=function(t){this._string=t,this._currentIndex=0,this._endIndex=this._string.length,this._previousCommand=window.SVGPathSeg.PATHSEG_UNKNOWN,this._skipOptionalSpaces()};i.prototype._isCurrentSpace=function(){const t=this._string[this._currentIndex];return t<=" "&&(" "==t||"\n"==t||"\t"==t||"\r"==t||"\f"==t)},i.prototype._skipOptionalSpaces=function(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex++;return this._currentIndex<this._endIndex},i.prototype._skipOptionalSpacesOrDelimiter=function(){return!(this._currentIndex<this._endIndex&&!this._isCurrentSpace()&&","!=this._string.charAt(this._currentIndex))&&(this._skipOptionalSpaces()&&this._currentIndex<this._endIndex&&","==this._string.charAt(this._currentIndex)&&(this._currentIndex++,this._skipOptionalSpaces()),this._currentIndex<this._endIndex)},i.prototype.hasMoreData=function(){return this._currentIndex<this._endIndex},i.prototype.peekSegmentType=function(){const t=this._string[this._currentIndex];return this._pathSegTypeFromChar(t)},i.prototype._pathSegTypeFromChar=function(t){switch(t){case"Z":case"z":return window.SVGPathSeg.PATHSEG_CLOSEPATH;case"M":return window.SVGPathSeg.PATHSEG_MOVETO_ABS;case"m":return window.SVGPathSeg.PATHSEG_MOVETO_REL;case"L":return window.SVGPathSeg.PATHSEG_LINETO_ABS;case"l":return window.SVGPathSeg.PATHSEG_LINETO_REL;case"C":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS;case"c":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL;case"Q":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS;case"q":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL;case"A":return window.SVGPathSeg.PATHSEG_ARC_ABS;case"a":return window.SVGPathSeg.PATHSEG_ARC_REL;case"H":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS;case"h":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL;case"V":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS;case"v":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL;case"S":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;case"s":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL;case"T":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;case"t":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;default:return window.SVGPathSeg.PATHSEG_UNKNOWN}},i.prototype._nextCommandHelper=function(t,e){return("+"==t||"-"==t||"."==t||t>="0"&&t<="9")&&e!=window.SVGPathSeg.PATHSEG_CLOSEPATH?e==window.SVGPathSeg.PATHSEG_MOVETO_ABS?window.SVGPathSeg.PATHSEG_LINETO_ABS:e==window.SVGPathSeg.PATHSEG_MOVETO_REL?window.SVGPathSeg.PATHSEG_LINETO_REL:e:window.SVGPathSeg.PATHSEG_UNKNOWN},i.prototype.initialCommandIsMoveTo=function(){if(!this.hasMoreData())return!0;const t=this.peekSegmentType();return t==window.SVGPathSeg.PATHSEG_MOVETO_ABS||t==window.SVGPathSeg.PATHSEG_MOVETO_REL},i.prototype._parseNumber=function(){let t=0,e=0,n=1,i=0,o=1,r=1;const h=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:this._currentIndex<this._endIndex&&"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,o=-1),this._currentIndex==this._endIndex||(this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")&&"."!=this._string.charAt(this._currentIndex))return;const s=this._currentIndex;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)this._currentIndex++;if(this._currentIndex!=s){let t=this._currentIndex-1,n=1;for(;t>=s;)e+=n*(this._string.charAt(t--)-"0"),n*=10}if(this._currentIndex<this._endIndex&&"."==this._string.charAt(this._currentIndex)){if(this._currentIndex++,this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)n*=10,i+=(this._string.charAt(this._currentIndex)-"0")/n,this._currentIndex+=1}if(this._currentIndex!=h&&this._currentIndex+1<this._endIndex&&("e"==this._string.charAt(this._currentIndex)||"E"==this._string.charAt(this._currentIndex))&&"x"!=this._string.charAt(this._currentIndex+1)&&"m"!=this._string.charAt(this._currentIndex+1)){if(this._currentIndex++,"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,r=-1),this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)t*=10,t+=this._string.charAt(this._currentIndex)-"0",this._currentIndex++}let a=e+i;return a*=o,t&&(a*=Math.pow(10,r*t)),h!=this._currentIndex?(this._skipOptionalSpacesOrDelimiter(),a):void 0},i.prototype._parseArcFlag=function(){if(this._currentIndex>=this._endIndex)return;let t=!1;const e=this._string.charAt(this._currentIndex++);if("0"==e)t=!1;else{if("1"!=e)return;t=!0}return this._skipOptionalSpacesOrDelimiter(),t},i.prototype.parseSegment=function(){const t=this._string[this._currentIndex];let n,i=this._pathSegTypeFromChar(t);if(i==window.SVGPathSeg.PATHSEG_UNKNOWN){if(this._previousCommand==window.SVGPathSeg.PATHSEG_UNKNOWN)return null;if(i=this._nextCommandHelper(t,this._previousCommand),i==window.SVGPathSeg.PATHSEG_UNKNOWN)return null}else this._currentIndex++;switch(this._previousCommand=i,i){case window.SVGPathSeg.PATHSEG_MOVETO_REL:return new window.SVGPathSegMovetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_MOVETO_ABS:return new window.SVGPathSegMovetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_REL:return new window.SVGPathSegLinetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_ABS:return new window.SVGPathSegLinetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:return new window.SVGPathSegLinetoHorizontalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:return new window.SVGPathSegLinetoHorizontalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:return new window.SVGPathSegLinetoVerticalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:return new window.SVGPathSegLinetoVerticalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_CLOSEPATH:return this._skipOptionalSpaces(),new window.SVGPathSegClosePath(e);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:return n={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicRel(e,n.x,n.y,n.x1,n.y1,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:return n={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicAbs(e,n.x,n.y,n.x1,n.y1,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:return n={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothRel(e,n.x,n.y,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:return n={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothAbs(e,n.x,n.y,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:return n={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticRel(e,n.x,n.y,n.x1,n.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:return n={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticAbs(e,n.x,n.y,n.x1,n.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:return new window.SVGPathSegCurvetoQuadraticSmoothRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:return new window.SVGPathSegCurvetoQuadraticSmoothAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_ARC_REL:return n={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcRel(e,n.x,n.y,n.x1,n.y1,n.arcAngle,n.arcLarge,n.arcSweep);case window.SVGPathSeg.PATHSEG_ARC_ABS:return n={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcAbs(e,n.x,n.y,n.x1,n.y1,n.arcAngle,n.arcLarge,n.arcSweep);default:throw"Unknown path seg type."}};const o=new n,r=new i(t);if(!r.initialCommandIsMoveTo())return[];for(;r.hasMoreData();){const t=r.parseSegment();if(!t)return[];o.appendSegment(t)}return o.pathSegList})}catch(t){console.warn("An error occurred in tsParticles pathseg polyfill. If the Polygon Mask is not working, please open an issue here: https://github.com/matteobruni/tsparticles",t)}}()}}]);
|
|
@@ -1066,9 +1066,9 @@
|
|
|
1066
1066
|
paint() {
|
|
1067
1067
|
const options = this.container.actualOptions;
|
|
1068
1068
|
this.draw((ctx => {
|
|
1069
|
-
if (options.backgroundMask.enable && options.backgroundMask.cover
|
|
1069
|
+
if (options.backgroundMask.enable && options.backgroundMask.cover) {
|
|
1070
1070
|
clear(ctx, this.size);
|
|
1071
|
-
this.paintBase(
|
|
1071
|
+
this.paintBase(this.coverColorStyle);
|
|
1072
1072
|
} else {
|
|
1073
1073
|
this.paintBase();
|
|
1074
1074
|
}
|
|
@@ -1111,11 +1111,16 @@
|
|
|
1111
1111
|
const container = this.container;
|
|
1112
1112
|
const pxRatio = container.retina.pixelRatio;
|
|
1113
1113
|
const size = container.canvas.size;
|
|
1114
|
+
const newSize = {
|
|
1115
|
+
width: this.element.offsetWidth * pxRatio,
|
|
1116
|
+
height: this.element.offsetHeight * pxRatio
|
|
1117
|
+
};
|
|
1118
|
+
if (newSize.height === size.height && newSize.width === size.width && newSize.height === this.element.height && newSize.width === this.element.width) {
|
|
1119
|
+
return;
|
|
1120
|
+
}
|
|
1114
1121
|
const oldSize = Object.assign({}, size);
|
|
1115
|
-
size.width = this.element.offsetWidth * pxRatio;
|
|
1116
|
-
size.height = this.element.offsetHeight * pxRatio;
|
|
1117
|
-
this.element.width = size.width;
|
|
1118
|
-
this.element.height = size.height;
|
|
1122
|
+
this.element.width = size.width = this.element.offsetWidth * pxRatio;
|
|
1123
|
+
this.element.height = size.height = this.element.offsetHeight * pxRatio;
|
|
1119
1124
|
if (this.container.started) {
|
|
1120
1125
|
this.resizeFactor = {
|
|
1121
1126
|
width: size.width / oldSize.width,
|
|
@@ -1239,12 +1244,13 @@
|
|
|
1239
1244
|
const color = cover.color;
|
|
1240
1245
|
const coverRgb = colorToRgb(color);
|
|
1241
1246
|
if (coverRgb) {
|
|
1242
|
-
|
|
1247
|
+
const coverColor = {
|
|
1243
1248
|
r: coverRgb.r,
|
|
1244
1249
|
g: coverRgb.g,
|
|
1245
1250
|
b: coverRgb.b,
|
|
1246
1251
|
a: cover.opacity
|
|
1247
1252
|
};
|
|
1253
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1248
1254
|
}
|
|
1249
1255
|
}
|
|
1250
1256
|
initTrail() {
|
|
@@ -3412,10 +3418,9 @@
|
|
|
3412
3418
|
delete container.canvas.resizeFactor;
|
|
3413
3419
|
}
|
|
3414
3420
|
async draw(delta) {
|
|
3415
|
-
const container = this.container;
|
|
3416
|
-
container.canvas.clear();
|
|
3417
|
-
const canvasSize = this.container.canvas.size;
|
|
3421
|
+
const container = this.container, canvasSize = this.container.canvas.size;
|
|
3418
3422
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
3423
|
+
container.canvas.clear();
|
|
3419
3424
|
await this.update(delta);
|
|
3420
3425
|
if (this.needsSort) {
|
|
3421
3426
|
this.zArray.sort(((a, b) => b.position.z - a.position.z || a.id - b.id));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.4 by Matteo Bruni */
|
|
2
2
|
!function(t,i){if("object"==typeof exports&&"object"==typeof module)module.exports=i();else if("function"==typeof define&&define.amd)define([],i);else{var s=i();for(var o in s)("object"==typeof exports?exports:t)[o]=s[o]}}(window,(function(){return function(){"use strict";var t={d:function(i,s){for(var o in s)t.o(s,o)&&!t.o(i,o)&&Object.defineProperty(i,o,{enumerable:!0,get:s[o]})},o:function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},i={};t.r(i),t.d(i,{loadAbsorbersPlugin:function(){return I}});class s{constructor(){this.radius=0,this.mass=0}load(t){t&&(void 0!==t.mass&&(this.mass=t.mass),void 0!==t.radius&&(this.radius=t.radius))}}class o{constructor(){this.enable=!1,this.minimumValue=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.minimumValue&&(this.minimumValue=t.minimumValue))}}class e{}e.generatedAttribute="generated",e.randomColorValue="random",e.midColorValue="mid",e.touchEndEvent="touchend",e.mouseDownEvent="mousedown",e.mouseUpEvent="mouseup",e.mouseMoveEvent="mousemove",e.touchStartEvent="touchstart",e.touchMoveEvent="touchmove",e.mouseLeaveEvent="mouseleave",e.mouseOutEvent="mouseout",e.touchCancelEvent="touchcancel",e.resizeEvent="resize",e.visibilityChangeEvent="visibilitychange",e.noPolygonDataLoaded="No polygon data loaded.",e.noPolygonFound="No polygon found, you need to specify SVG url in config.";new WeakMap;new WeakMap;class r{constructor(t,i){let s,o;if(void 0===i){if("number"==typeof t)throw new Error("tsParticles - Vector not initialized correctly");const i=t;[s,o]=[i.x,i.y]}else[s,o]=[t,i];this.x=s,this.y=o}static clone(t){return r.create(t.x,t.y)}static create(t,i){return new r(t,i)}static get origin(){return r.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 r.create(this.x+t.x,this.y+t.y)}addTo(t){this.x+=t.x,this.y+=t.y}sub(t){return r.create(this.x-t.x,this.y-t.y)}subFrom(t){this.x-=t.x,this.y-=t.y}mult(t){return r.create(this.x*t,this.y*t)}multTo(t){this.x*=t,this.y*=t}div(t){return r.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 r.clone(this)}setTo(t){this.x=t.x,this.y=t.y}rotate(t){return r.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t))}updateFromAngle(t,i){this.x=Math.cos(t)*i,this.y=Math.sin(t)*i}}new WeakMap,new WeakSet;new WeakMap;new WeakMap;new WeakMap;function n(t){const i=h(t);let s=l(t);return i===s&&(s=0),Math.random()*(i-s)+s}function a(t){return"number"==typeof t?t:n(t)}function l(t){return"number"==typeof t?t:t.min}function h(t){return"number"==typeof t?t:t.max}function d(t,i){if(t===i||void 0===i&&"number"==typeof t)return t;const s=l(t),o=h(t);return void 0!==i?{min:Math.min(s,i),max:Math.max(o,i)}:d(s,o)}function c(t,i){const s=t.x-i.x,o=t.y-i.y;return{dx:s,dy:o,distance:Math.sqrt(s*s+o*o)}}function u(t,i){return c(t,i).distance}function b(t,i){return t===i||i instanceof Array&&i.indexOf(t)>-1}function v(t,i,s=!0){return t[void 0!==i&&s?i%t.length:function(t){return Math.floor(Math.random()*t.length)}(t)]}function y(t,i){return{bottom:t.y+i,left:t.x-i,right:t.x+i,top:t.y-i}}function f(t,i,s){let o=s;return o<0&&(o+=1),o>1&&(o-=1),o<1/6?t+6*(i-t)*o:o<.5?i:o<2/3?t+(i-t)*(2/3-o)*6:t}function p(t){if(t.startsWith("rgb")){const i=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([\d.]+)\s*)?\)/i.exec(t);return i?{a:i.length>4?parseFloat(i[5]):1,b:parseInt(i[3],10),g:parseInt(i[2],10),r:parseInt(i[1],10)}:void 0}if(t.startsWith("hsl")){const i=/hsla?\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i.exec(t);return i?function(t){const i=m(t);return{a:t.a,b:i.b,g:i.g,r:i.r}}({a:i.length>4?parseFloat(i[5]):1,h:parseInt(i[1],10),l:parseInt(i[3],10),s:parseInt(i[2],10)}):void 0}if(t.startsWith("hsv")){const i=/hsva?\(\s*(\d+)°\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i.exec(t);return i?function(t){const i=x(t);return{a:t.a,b:i.b,g:i.g,r:i.r}}({a:i.length>4?parseFloat(i[5]):1,h:parseInt(i[1],10),s:parseInt(i[2],10),v:parseInt(i[3],10)}):void 0}{const i=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,s=t.replace(i,((t,i,s,o,e)=>i+i+s+s+o+o+(void 0!==e?e+e:""))),o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(s);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 g(t,i,s=!0){var o,r,n;if(void 0===t)return;const a="string"==typeof t?{value:t}:t;let l;if("string"==typeof a.value)l=a.value===e.randomColorValue?M():function(t){return p(t)}(a.value);else if(a.value instanceof Array){l=g({value:v(a.value,i,s)})}else{const t=a.value,i=null!==(o=t.rgb)&&void 0!==o?o:a.value;if(void 0!==i.r)l=i;else{const i=null!==(r=t.hsl)&&void 0!==r?r:a.value;if(void 0!==i.h&&void 0!==i.l)l=m(i);else{const i=null!==(n=t.hsv)&&void 0!==n?n:a.value;void 0!==i.h&&void 0!==i.v&&(l=x(i))}}}return l}function m(t){const i={b:0,g:0,r:0},s={h:t.h/360,l:t.l/100,s:t.s/100};if(0===s.s)i.b=s.l,i.g=s.l,i.r=s.l;else{const t=s.l<.5?s.l*(1+s.s):s.l+s.s-s.l*s.s,o=2*s.l-t;i.r=f(o,t,s.h+1/3),i.g=f(o,t,s.h),i.b=f(o,t,s.h-1/3)}return i.r=Math.floor(255*i.r),i.g=Math.floor(255*i.g),i.b=Math.floor(255*i.b),i}function x(t){const i={b:0,g:0,r:0},s=t.h/60,o=t.s/100,e=t.v/100,r=e*o,n=r*(1-Math.abs(s%2-1));let a;if(s>=0&&s<=1?a={r:r,g:n,b:0}:s>1&&s<=2?a={r:n,g:r,b:0}:s>2&&s<=3?a={r:0,g:r,b:n}:s>3&&s<=4?a={r:0,g:n,b:r}:s>4&&s<=5?a={r:n,g:0,b:r}:s>5&&s<=6&&(a={r:r,g:0,b:n}),a){const t=e-r;i.r=Math.floor(255*(a.r+t)),i.g=Math.floor(255*(a.g+t)),i.b=Math.floor(255*(a.b+t))}return i}function M(t){const i=null!=t?t:0;return{b:Math.floor(n(d(i,256))),g:Math.floor(n(d(i,256))),r:Math.floor(n(d(i,256)))}}new WeakMap;class w extends class{constructor(){this.random=new o,this.value=0}load(t){t&&("boolean"==typeof t.random?this.random.enable=t.random:this.random.load(t.random),void 0!==t.value&&(this.value=d(t.value,this.random.enable?this.random.minimumValue:void 0)))}}{constructor(){super(),this.density=5,this.random.minimumValue=1,this.value=50,this.limit=new s}load(t){t&&(super.load(t),void 0!==t.density&&(this.density=t.density),"number"==typeof t.limit?this.limit.radius=t.limit:this.limit.load(t.limit))}}class P{constructor(){this.value="#fff"}static create(t,i){const s=new P;return s.load(t),void 0!==i&&("string"==typeof i||i instanceof Array?s.load({value:i}):s.load(i)),s}load(t){void 0!==(null==t?void 0:t.value)&&(this.value=t.value)}}class A{constructor(){this.color=new P,this.color.value="#000000",this.draggable=!1,this.opacity=1,this.destroy=!0,this.orbits=!1,this.size=new w}load(t){void 0!==t&&(void 0!==t.color&&(this.color=P.create(this.color,t.color)),void 0!==t.draggable&&(this.draggable=t.draggable),this.name=t.name,void 0!==t.opacity&&(this.opacity=t.opacity),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=d(t.position.x)),void 0!==t.position.y&&(this.position.y=d(t.position.y))),void 0!==t.size&&this.size.load(t.size),void 0!==t.destroy&&(this.destroy=t.destroy),void 0!==t.orbits&&(this.orbits=t.orbits))}}class z{constructor(t,i,s,o){var e,n,l;this.absorbers=t,this.container=i,this.initialPosition=o?r.create(o.x,o.y):void 0,s instanceof A?this.options=s:(this.options=new A,this.options.load(s)),this.dragging=!1,this.name=this.options.name,this.opacity=this.options.opacity,this.size=a(this.options.size.value)*i.retina.pixelRatio,this.mass=this.size*this.options.size.density*i.retina.reduceFactor;const h=this.options.size.limit;this.limit={radius:h.radius*i.retina.pixelRatio*i.retina.reduceFactor,mass:h.mass},this.color=null!==(e=g(this.options.color))&&void 0!==e?e:{b:0,g:0,r:0},this.position=null!==(l=null===(n=this.initialPosition)||void 0===n?void 0:n.copy())&&void 0!==l?l:this.calcPosition()}attract(t){const i=this.container,s=this.options;if(s.draggable){const t=i.interactivity.mouse;if(t.clicking&&t.downPosition){u(this.position,t.downPosition)<=this.size&&(this.dragging=!0)}else this.dragging=!1;this.dragging&&t.position&&(this.position.x=t.position.x,this.position.y=t.position.y)}const o=t.getPosition(),{dx:e,dy:n,distance:a}=c(this.position,o),l=r.create(e,n);if(l.length=this.mass/Math.pow(a,2)*i.retina.reduceFactor,a<this.size+t.getRadius()){const o=.033*t.getRadius()*i.retina.pixelRatio;this.size>t.getRadius()&&a<this.size-t.getRadius()||void 0!==t.absorberOrbit&&t.absorberOrbit.length<0?s.destroy?t.destroy():(t.needsNewPosition=!0,this.updateParticlePosition(t,l)):(s.destroy&&(t.size.value-=o),this.updateParticlePosition(t,l)),(this.limit.radius<=0||this.size<this.limit.radius)&&(this.size+=o),(this.limit.mass<=0||this.mass<this.limit.mass)&&(this.mass+=o*this.options.size.density*i.retina.reduceFactor)}else this.updateParticlePosition(t,l)}resize(){const t=this.initialPosition;var i,s,o,e;this.position=t&&(i=t,s=this.container.canvas.size,function(t,i,s){let o=!0;return s&&"bottom"!==s||(o=t.top<i.height),!o||s&&"left"!==s||(o=t.right>0),!o||s&&"right"!==s||(o=t.left<i.width),!o||s&&"top"!==s||(o=t.bottom>0),o}(y(i,null!=o?o:0),s,e))?t:this.calcPosition()}draw(t){var i,s;t.translate(this.position.x,this.position.y),t.beginPath(),t.arc(0,0,this.size,0,2*Math.PI,!1),t.closePath(),t.fillStyle=(i=this.color,s=this.opacity,`rgba(${i.r}, ${i.g}, ${i.b}, ${null!=s?s:1})`),t.fill()}calcPosition(){var t,i;const s=this.container,o=this.options.position;return r.create(a(null!==(t=null==o?void 0:o.x)&&void 0!==t?t:100*Math.random())/100*s.canvas.size.width,a(null!==(i=null==o?void 0:o.y)&&void 0!==i?i:100*Math.random())/100*s.canvas.size.height)}updateParticlePosition(t,i){var s;if(t.destroyed)return;const o=this.container,e=o.canvas.size;if(t.needsNewPosition&&(t.position.x=Math.floor(Math.random()*e.width),t.position.y=Math.floor(Math.random()*e.height),t.velocity.setTo(t.initialVelocity),t.absorberOrbit=void 0,t.needsNewPosition=!1),this.options.orbits){if(void 0===t.absorberOrbit&&(t.absorberOrbit=r.create(0,0),t.absorberOrbit.length=u(t.getPosition(),this.position),t.absorberOrbit.angle=Math.random()*Math.PI*2),t.absorberOrbit.length<=this.size&&!this.options.destroy){const i=Math.min(e.width,e.height);t.absorberOrbit.length=i*(.2*Math.random()-.1+1)}void 0===t.absorberOrbitDirection&&(t.absorberOrbitDirection=t.velocity.x>=0?"clockwise":"counter-clockwise");const n=t.absorberOrbit.length,a=t.absorberOrbit.angle,l=t.absorberOrbitDirection;t.velocity.x=0,t.velocity.y=0;const h={x:"clockwise"===l?Math.cos:Math.sin,y:"clockwise"===l?Math.sin:Math.cos};t.position.x=this.position.x+n*h.x(a),t.position.y=this.position.y+n*h.y(a),t.absorberOrbit.length-=i.length,t.absorberOrbit.angle+=(null!==(s=t.retina.moveSpeed)&&void 0!==s?s:0)*o.retina.pixelRatio/100*o.retina.reduceFactor}else{const s=r.origin;s.length=i.length,s.angle=i.angle,t.velocity.addTo(s)}}}class O{constructor(t){this.container=t,this.array=[],this.absorbers=[],this.interactivityAbsorbers=[];const i=t;i.getAbsorber=t=>void 0===t||"number"==typeof t?this.array[t||0]:this.array.find((i=>i.name===t)),i.addAbsorber=(t,i)=>this.addAbsorber(t,i)}init(t){var i,s;if(!t)return;t.absorbers&&(t.absorbers instanceof Array?this.absorbers=t.absorbers.map((t=>{const i=new A;return i.load(t),i})):(this.absorbers instanceof Array&&(this.absorbers=new A),this.absorbers.load(t.absorbers)));const o=null===(s=null===(i=t.interactivity)||void 0===i?void 0:i.modes)||void 0===s?void 0:s.absorbers;if(o&&(o instanceof Array?this.interactivityAbsorbers=o.map((t=>{const i=new A;return i.load(t),i})):(this.interactivityAbsorbers instanceof Array&&(this.interactivityAbsorbers=new A),this.interactivityAbsorbers.load(o))),this.absorbers instanceof Array)for(const t of this.absorbers)this.addAbsorber(t);else this.addAbsorber(this.absorbers)}particleUpdate(t){for(const i of this.array)if(i.attract(t),t.destroyed)break}draw(t){for(const i of this.array)t.save(),i.draw(t),t.restore()}stop(){this.array=[]}resize(){for(const t of this.array)t.resize()}handleClickMode(t){const i=this.container,s=this.absorbers,o=this.interactivityAbsorbers;if("absorber"===t){let t;o instanceof Array?o.length>0&&(t=v(o)):t=o;const e=null!=t?t:s instanceof Array?v(s):s,r=i.interactivity.mouse.clickPosition;this.addAbsorber(e,r)}}addAbsorber(t,i){const s=new z(this,this.container,t,i);return this.array.push(s),s}removeAbsorber(t){const i=this.array.indexOf(t);i>=0&&this.array.splice(i,1)}}class k{constructor(){this.id="absorbers"}getPlugin(t){return new O(t)}needsPlugin(t){var i,s,o;if(void 0===t)return!1;const e=t.absorbers;let r=!1;return e instanceof Array?e.length&&(r=!0):(void 0!==e||(null===(o=null===(s=null===(i=t.interactivity)||void 0===i?void 0:i.events)||void 0===s?void 0:s.onClick)||void 0===o?void 0:o.mode)&&b("absorber",t.interactivity.events.onClick.mode))&&(r=!0),r}loadOptions(t,i){var s,o;if(!this.needsPlugin(t)&&!this.needsPlugin(i))return;const e=t;if(null==i?void 0:i.absorbers)if((null==i?void 0:i.absorbers)instanceof Array)e.absorbers=null==i?void 0:i.absorbers.map((t=>{const i=new A;return i.load(t),i}));else{let t=e.absorbers;void 0===(null==t?void 0:t.load)&&(e.absorbers=t=new A),t.load(null==i?void 0:i.absorbers)}const r=null===(o=null===(s=null==i?void 0:i.interactivity)||void 0===s?void 0:s.modes)||void 0===o?void 0:o.absorbers;if(r)if(r instanceof Array)e.interactivity.modes.absorbers=r.map((t=>{const i=new A;return i.load(t),i}));else{let t=e.interactivity.modes.absorbers;void 0===(null==t?void 0:t.load)&&(e.interactivity.modes.absorbers=t=new A),t.load(r)}}}async function I(t){const i=new k;await t.addPlugin(i)}return i}()}));
|
|
@@ -966,9 +966,9 @@
|
|
|
966
966
|
paint() {
|
|
967
967
|
const options = this.container.actualOptions;
|
|
968
968
|
this.draw((ctx => {
|
|
969
|
-
if (options.backgroundMask.enable && options.backgroundMask.cover
|
|
969
|
+
if (options.backgroundMask.enable && options.backgroundMask.cover) {
|
|
970
970
|
clear(ctx, this.size);
|
|
971
|
-
this.paintBase(
|
|
971
|
+
this.paintBase(this.coverColorStyle);
|
|
972
972
|
} else {
|
|
973
973
|
this.paintBase();
|
|
974
974
|
}
|
|
@@ -1011,11 +1011,16 @@
|
|
|
1011
1011
|
const container = this.container;
|
|
1012
1012
|
const pxRatio = container.retina.pixelRatio;
|
|
1013
1013
|
const size = container.canvas.size;
|
|
1014
|
+
const newSize = {
|
|
1015
|
+
width: this.element.offsetWidth * pxRatio,
|
|
1016
|
+
height: this.element.offsetHeight * pxRatio
|
|
1017
|
+
};
|
|
1018
|
+
if (newSize.height === size.height && newSize.width === size.width && newSize.height === this.element.height && newSize.width === this.element.width) {
|
|
1019
|
+
return;
|
|
1020
|
+
}
|
|
1014
1021
|
const oldSize = Object.assign({}, size);
|
|
1015
|
-
size.width = this.element.offsetWidth * pxRatio;
|
|
1016
|
-
size.height = this.element.offsetHeight * pxRatio;
|
|
1017
|
-
this.element.width = size.width;
|
|
1018
|
-
this.element.height = size.height;
|
|
1022
|
+
this.element.width = size.width = this.element.offsetWidth * pxRatio;
|
|
1023
|
+
this.element.height = size.height = this.element.offsetHeight * pxRatio;
|
|
1019
1024
|
if (this.container.started) {
|
|
1020
1025
|
this.resizeFactor = {
|
|
1021
1026
|
width: size.width / oldSize.width,
|
|
@@ -1139,12 +1144,13 @@
|
|
|
1139
1144
|
const color = cover.color;
|
|
1140
1145
|
const coverRgb = colorToRgb(color);
|
|
1141
1146
|
if (coverRgb) {
|
|
1142
|
-
|
|
1147
|
+
const coverColor = {
|
|
1143
1148
|
r: coverRgb.r,
|
|
1144
1149
|
g: coverRgb.g,
|
|
1145
1150
|
b: coverRgb.b,
|
|
1146
1151
|
a: cover.opacity
|
|
1147
1152
|
};
|
|
1153
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1148
1154
|
}
|
|
1149
1155
|
}
|
|
1150
1156
|
initTrail() {
|
|
@@ -3356,10 +3362,9 @@
|
|
|
3356
3362
|
delete container.canvas.resizeFactor;
|
|
3357
3363
|
}
|
|
3358
3364
|
async draw(delta) {
|
|
3359
|
-
const container = this.container;
|
|
3360
|
-
container.canvas.clear();
|
|
3361
|
-
const canvasSize = this.container.canvas.size;
|
|
3365
|
+
const container = this.container, canvasSize = this.container.canvas.size;
|
|
3362
3366
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
3367
|
+
container.canvas.clear();
|
|
3363
3368
|
await this.update(delta);
|
|
3364
3369
|
if (this.needsSort) {
|
|
3365
3370
|
this.zArray.sort(((a, b) => b.position.z - a.position.z || a.id - b.id));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.4 by Matteo Bruni */
|
|
2
2
|
!function(t,i){if("object"==typeof exports&&"object"==typeof module)module.exports=i();else if("function"==typeof define&&define.amd)define([],i);else{var e=i();for(var o in e)("object"==typeof exports?exports:t)[o]=e[o]}}(window,(function(){return function(){"use strict";var t={d:function(i,e){for(var o in e)t.o(e,o)&&!t.o(i,o)&&Object.defineProperty(i,o,{enumerable:!0,get:e[o]})},o:function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},i={};t.r(i),t.d(i,{loadEmittersPlugin:function(){return J}});class e{randomPosition(t,i,e){const[o,s]=[i.width/2,i.height/2],n=((t,i)=>{const e=Math.random()/4,o=Math.atan(i/t*Math.tan(2*Math.PI*e)),s=Math.random();return s<.25?o:s<.5?Math.PI-o:s<.75?Math.PI+o:-o})(o,s),r=(d=n,(h=o)*(l=s)/Math.sqrt((l*Math.cos(d))**2+(h*Math.sin(d))**2)),a=e?r*Math.sqrt(Math.random()):r;var h,l,d;return{x:t.x+a*Math.cos(n),y:t.y+a*Math.sin(n)}}}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 s{constructor(){this.count=0,this.enable=!1,this.offset=0,this.speed=1,this.sync=!0}load(t){void 0!==t&&(void 0!==t.count&&(this.count=u(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.offset&&(this.offset=u(t.offset)),void 0!==t.speed&&(this.speed=u(t.speed)),void 0!==t.sync&&(this.sync=t.sync))}}class n{constructor(){this.h=new s,this.s=new s,this.l=new s}load(t){t&&(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class r{constructor(){this.value="#fff"}static create(t,i){const e=new r;return e.load(t),void 0!==i&&("string"==typeof i||i instanceof Array?e.load({value:i}):e.load(i)),e}load(t){void 0!==(null==t?void 0:t.value)&&(this.value=t.value)}}class a extends r{constructor(){super(),this.animation=new n}static create(t,i){const e=new a;return e.load(t),void 0!==i&&("string"==typeof i||i instanceof Array?e.load({value:i}):e.load(i)),e}load(t){if(super.load(t),!t)return;const i=t.animation;void 0!==i&&(void 0!==i.enable?this.animation.h.load(i):this.animation.load(t.animation))}}new WeakMap,new WeakSet;new WeakMap;new WeakMap;new WeakMap;function h(t){const i=c(t);let e=d(t);return i===e&&(e=0),Math.random()*(i-e)+e}function l(t){return"number"==typeof t?t:h(t)}function d(t){return"number"==typeof t?t:t.min}function c(t){return"number"==typeof t?t:t.max}function u(t,i){if(t===i||void 0===i&&"number"==typeof t)return t;const e=d(t),o=c(t);return void 0!==i?{min:Math.min(e,i),max:Math.max(o,i)}:u(e,o)}function p(t,i){return t===i||i instanceof Array&&i.indexOf(t)>-1}function f(t,i,e=!0){return t[void 0!==i&&e?i%t.length:function(t){return Math.floor(Math.random()*t.length)}(t)]}function v(t,i){return{bottom:t.y+i,left:t.x-i,right:t.x+i,top:t.y-i}}function m(t,...i){for(const e of i){if(null==e)continue;if("object"!=typeof e){t=e;continue}const i=Array.isArray(e);!i||"object"==typeof t&&t&&Array.isArray(t)?i||"object"==typeof t&&t&&!Array.isArray(t)||(t={}):t=[];for(const i in e){if("__proto__"===i)continue;const o=e[i],s="object"==typeof o,n=t;n[i]=s&&Array.isArray(o)?o.map((t=>m(n[i],t))):m(n[i],o)}}return t}function y(t,i,e){let o=e;return o<0&&(o+=1),o>1&&(o-=1),o<1/6?t+6*(i-t)*o:o<.5?i:o<2/3?t+(i-t)*(2/3-o)*6:t}function w(t){if(t.startsWith("rgb")){const i=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([\d.]+)\s*)?\)/i.exec(t);return i?{a:i.length>4?parseFloat(i[5]):1,b:parseInt(i[3],10),g:parseInt(i[2],10),r:parseInt(i[1],10)}:void 0}if(t.startsWith("hsl")){const i=/hsla?\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i.exec(t);return i?function(t){const i=E(t);return{a:t.a,b:i.b,g:i.g,r:i.r}}({a:i.length>4?parseFloat(i[5]):1,h:parseInt(i[1],10),l:parseInt(i[3],10),s:parseInt(i[2],10)}):void 0}if(t.startsWith("hsv")){const i=/hsva?\(\s*(\d+)°\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i.exec(t);return i?function(t){const i=M(t);return{a:t.a,b:i.b,g:i.g,r:i.r}}({a:i.length>4?parseFloat(i[5]):1,h:parseInt(i[1],10),s:parseInt(i[2],10),v:parseInt(i[3],10)}):void 0}{const i=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,e=t.replace(i,((t,i,e,o,s)=>i+i+e+e+o+o+(void 0!==s?s+s:""))),o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(e);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 g(t,i,e=!0){var s,n,r;if(void 0===t)return;const a="string"==typeof t?{value:t}:t;let h;if("string"==typeof a.value)h=a.value===o.randomColorValue?P():function(t){return w(t)}(a.value);else if(a.value instanceof Array){h=g({value:f(a.value,i,e)})}else{const t=a.value,i=null!==(s=t.rgb)&&void 0!==s?s:a.value;if(void 0!==i.r)h=i;else{const i=null!==(n=t.hsl)&&void 0!==n?n:a.value;if(void 0!==i.h&&void 0!==i.l)h=E(i);else{const i=null!==(r=t.hsv)&&void 0!==r?r:a.value;void 0!==i.h&&void 0!==i.v&&(h=M(i))}}}return h}function b(t,i,e=!0){const o=g(t,i,e);return void 0!==o?function(t){const i=t.r/255,e=t.g/255,o=t.b/255,s=Math.max(i,e,o),n=Math.min(i,e,o),r={h:0,l:(s+n)/2,s:0};s!=n&&(r.s=r.l<.5?(s-n)/(s+n):(s-n)/(2-s-n),r.h=i===s?(e-o)/(s-n):r.h=e===s?2+(o-i)/(s-n):4+(i-e)/(s-n));r.l*=100,r.s*=100,r.h*=60,r.h<0&&(r.h+=360);return r}(o):void 0}function E(t){const i={b:0,g:0,r:0},e={h:t.h/360,l:t.l/100,s:t.s/100};if(0===e.s)i.b=e.l,i.g=e.l,i.r=e.l;else{const t=e.l<.5?e.l*(1+e.s):e.l+e.s-e.l*e.s,o=2*e.l-t;i.r=y(o,t,e.h+1/3),i.g=y(o,t,e.h),i.b=y(o,t,e.h-1/3)}return i.r=Math.floor(255*i.r),i.g=Math.floor(255*i.g),i.b=Math.floor(255*i.b),i}function M(t){const i={b:0,g:0,r:0},e=t.h/60,o=t.s/100,s=t.v/100,n=s*o,r=n*(1-Math.abs(e%2-1));let a;if(e>=0&&e<=1?a={r:n,g:r,b:0}:e>1&&e<=2?a={r:r,g:n,b:0}:e>2&&e<=3?a={r:0,g:n,b:r}:e>3&&e<=4?a={r:0,g:r,b:n}:e>4&&e<=5?a={r:r,g:0,b:n}:e>5&&e<=6&&(a={r:n,g:0,b:r}),a){const t=s-n;i.r=Math.floor(255*(a.r+t)),i.g=Math.floor(255*(a.g+t)),i.b=Math.floor(255*(a.b+t))}return i}function P(t){const i=null!=t?t:0;return{b:Math.floor(h(u(i,256))),g:Math.floor(h(u(i,256))),r:Math.floor(h(u(i,256)))}}new WeakMap;class C{constructor(){this.wait=!1}load(t){void 0!==t&&(void 0!==t.count&&(this.count=t.count),void 0!==t.delay&&(this.delay=t.delay),void 0!==t.duration&&(this.duration=t.duration),void 0!==t.wait&&(this.wait=t.wait))}}class x{constructor(){this.quantity=1,this.delay=.1}load(t){void 0!==t&&(void 0!==t.quantity&&(this.quantity=u(t.quantity)),void 0!==t.delay&&(this.delay=u(t.delay)))}}class D{constructor(){this.mode="percent",this.height=0,this.width=0}load(t){void 0!==t&&(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.height&&(this.height=t.height),void 0!==t.width&&(this.width=t.width))}}class S{constructor(){this.autoPlay=!0,this.fill=!0,this.life=new C,this.rate=new x,this.shape="square",this.startCount=0}load(t){void 0!==t&&(void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.size&&(void 0===this.size&&(this.size=new D),this.size.load(t.size)),void 0!==t.direction&&(this.direction=t.direction),this.domId=t.domId,void 0!==t.fill&&(this.fill=t.fill),this.life.load(t.life),this.name=t.name,void 0!==t.particles&&(this.particles=m({},t.particles)),this.rate.load(t.rate),void 0!==t.shape&&(this.shape=t.shape),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=u(t.position.x)),void 0!==t.position.y&&(this.position.y=u(t.position.y))),void 0!==t.spawnColor&&(void 0===this.spawnColor&&(this.spawnColor=new a),this.spawnColor.load(t.spawnColor)),void 0!==t.startCount&&(this.startCount=t.startCount))}}var A,z,I,T=function(t,i,e,o,s){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!s:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?s.call(t,e):s?s.value=e:i.set(t,e),e},k=function(t,i,e,o){if("a"===e&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!o:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?o:"a"===e?o.call(t):o?o.value:i.get(t)};class j{constructor(t,i,e,o,s){var n,r,a,h,l,d,c,u;this.emitters=i,this.container=e,A.set(this,void 0),z.set(this,void 0),I.set(this,void 0),T(this,I,t,"f"),this.currentDuration=0,this.currentEmitDelay=0,this.currentSpawnDelay=0,this.initialPosition=s,o instanceof S?this.options=o:(this.options=new S,this.options.load(o)),this.spawnDelay=1e3*(null!==(n=this.options.life.delay)&&void 0!==n?n:0)/this.container.retina.reduceFactor,this.position=null!==(r=this.initialPosition)&&void 0!==r?r:this.calcPosition(),this.name=this.options.name,this.shape=null===(a=k(this,I,"f").emitterShapeManager)||void 0===a?void 0:a.getShape(this.options.shape),this.fill=this.options.fill,T(this,A,!this.options.life.wait,"f"),T(this,z,!1,"f");let p=m({},this.options.particles);null!=p||(p={}),null!==(h=p.move)&&void 0!==h||(p.move={}),null!==(l=(u=p.move).direction)&&void 0!==l||(u.direction=this.options.direction),this.options.spawnColor&&(this.spawnColor=b(this.options.spawnColor)),this.paused=!this.options.autoPlay,this.particlesOptions=p,this.size=null!==(d=this.options.size)&&void 0!==d?d:(()=>{const t=new D;return t.load({height:0,mode:"percent",width:0}),t})(),this.lifeCount=null!==(c=this.options.life.count)&&void 0!==c?c:-1,this.immortal=this.lifeCount<=0,this.play()}externalPlay(){this.paused=!1,this.play()}externalPause(){this.paused=!0,this.pause()}play(){var t;if(!this.paused&&this.container.retina.reduceFactor&&(this.lifeCount>0||this.immortal||!this.options.life.count)&&(k(this,A,"f")||this.currentSpawnDelay>=(null!==(t=this.spawnDelay)&&void 0!==t?t:0))){if(void 0===this.emitDelay){const t=l(this.options.rate.delay);this.emitDelay=1e3*t/this.container.retina.reduceFactor}(this.lifeCount>0||this.immortal)&&this.prepareToDie()}}pause(){this.paused||delete this.emitDelay}resize(){const t=this.initialPosition;var i,e,o,s;this.position=t&&(i=t,e=this.container.canvas.size,function(t,i,e){let o=!0;return e&&"bottom"!==e||(o=t.top<i.height),!o||e&&"left"!==e||(o=t.right>0),!o||e&&"right"!==e||(o=t.left<i.width),!o||e&&"top"!==e||(o=t.bottom>0),o}(v(i,null!=o?o:0),e,s))?t:this.calcPosition()}update(t){var i,e,o;this.paused||(k(this,A,"f")&&(T(this,A,!1,"f"),this.currentSpawnDelay=null!==(i=this.spawnDelay)&&void 0!==i?i:0,this.currentEmitDelay=null!==(e=this.emitDelay)&&void 0!==e?e:0),k(this,z,"f")||(T(this,z,!0,"f"),this.emitParticles(this.options.startCount)),void 0!==this.duration&&(this.currentDuration+=t.value,this.currentDuration>=this.duration&&(this.pause(),void 0!==this.spawnDelay&&delete this.spawnDelay,this.immortal||this.lifeCount--,this.lifeCount>0||this.immortal?(this.position=this.calcPosition(),this.spawnDelay=1e3*(null!==(o=this.options.life.delay)&&void 0!==o?o:0)/this.container.retina.reduceFactor):this.destroy(),this.currentDuration-=this.duration,delete this.duration)),void 0!==this.spawnDelay&&(this.currentSpawnDelay+=t.value,this.currentSpawnDelay>=this.spawnDelay&&(this.play(),this.currentSpawnDelay-=this.currentSpawnDelay,delete this.spawnDelay)),void 0!==this.emitDelay&&(this.currentEmitDelay+=t.value,this.currentEmitDelay>=this.emitDelay&&(this.emit(),this.currentEmitDelay-=this.emitDelay)))}getPosition(){if(this.options.domId){const t=this.container,i=document.getElementById(this.options.domId);if(i){const e=i.getBoundingClientRect();return{x:(e.x+e.width/2)*t.retina.pixelRatio,y:(e.y+e.height/2)*t.retina.pixelRatio}}}return this.position}getSize(){const t=this.container;if(this.options.domId){const i=document.getElementById(this.options.domId);if(i){const e=i.getBoundingClientRect();return{width:e.width*t.retina.pixelRatio,height:e.height*t.retina.pixelRatio}}}return{width:"percent"===this.size.mode?t.canvas.size.width*this.size.width/100:this.size.width,height:"percent"===this.size.mode?t.canvas.size.height*this.size.height/100:this.size.height}}prepareToDie(){var t;if(this.paused)return;const i=null===(t=this.options.life)||void 0===t?void 0:t.duration;this.container.retina.reduceFactor&&(this.lifeCount>0||this.immortal)&&void 0!==i&&i>0&&(this.duration=1e3*i)}destroy(){this.emitters.removeEmitter(this)}calcPosition(){var t,i;const e=this.container,o=this.options.position;return{x:l(null!==(t=null==o?void 0:o.x)&&void 0!==t?t:100*Math.random())/100*e.canvas.size.width,y:l(null!==(i=null==o?void 0:o.y)&&void 0!==i?i:100*Math.random())/100*e.canvas.size.height}}emit(){if(this.paused)return;const t=l(this.options.rate.quantity);this.emitParticles(t)}emitParticles(t){var i,e,o;const s=this.container,n=this.getPosition(),r=this.getSize();for(let a=0;a<t;a++){const t=m({},this.particlesOptions);if(this.spawnColor){const e=null===(i=this.options.spawnColor)||void 0===i?void 0:i.animation;e&&(this.spawnColor.h=this.setColorAnimation(e.h,this.spawnColor.h,360),this.spawnColor.s=this.setColorAnimation(e.s,this.spawnColor.s,100),this.spawnColor.l=this.setColorAnimation(e.l,this.spawnColor.l,100)),t.color?t.color.value=this.spawnColor:t.color={value:this.spawnColor}}if(!n)return;const a=null!==(o=null===(e=this.shape)||void 0===e?void 0:e.randomPosition(n,r,this.fill))&&void 0!==o?o:n;s.particles.addParticle(a,t)}}setColorAnimation(t,i,e){var o;const s=this.container;if(!t.enable)return i;const n=h(t.offset),r=1e3*l(this.options.rate.delay)/s.retina.reduceFactor;return(i+l(null!==(o=t.speed)&&void 0!==o?o:0)*s.fpsLimit/r+3.6*n)%e}}A=new WeakMap,z=new WeakMap,I=new WeakMap;var W,O=function(t,i,e,o,s){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!s:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?s.call(t,e):s?s.value=e:i.set(t,e),e},F=function(t,i,e,o){if("a"===e&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!o:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?o:"a"===e?o.call(t):o?o.value:i.get(t)};class q{constructor(t,i){this.container=i,W.set(this,void 0),O(this,W,t,"f"),this.array=[],this.emitters=[],this.interactivityEmitters=[];const e=i;e.getEmitter=t=>void 0===t||"number"==typeof t?this.array[t||0]:this.array.find((i=>i.name===t)),e.addEmitter=(t,i)=>this.addEmitter(t,i),e.removeEmitter=t=>{const i=e.getEmitter(t);i&&this.removeEmitter(i)},e.playEmitter=t=>{const i=e.getEmitter(t);i&&i.externalPlay()},e.pauseEmitter=t=>{const i=e.getEmitter(t);i&&i.externalPause()}}init(t){var i,e;if(!t)return;t.emitters&&(t.emitters instanceof Array?this.emitters=t.emitters.map((t=>{const i=new S;return i.load(t),i})):(this.emitters instanceof Array&&(this.emitters=new S),this.emitters.load(t.emitters)));const o=null===(e=null===(i=t.interactivity)||void 0===i?void 0:i.modes)||void 0===e?void 0:e.emitters;if(o&&(o instanceof Array?this.interactivityEmitters=o.map((t=>{const i=new S;return i.load(t),i})):(this.interactivityEmitters instanceof Array&&(this.interactivityEmitters=new S),this.interactivityEmitters.load(o))),this.emitters instanceof Array)for(const t of this.emitters)this.addEmitter(t);else this.addEmitter(this.emitters)}play(){for(const t of this.array)t.play()}pause(){for(const t of this.array)t.pause()}stop(){this.array=[]}update(t){for(const i of this.array)i.update(t)}handleClickMode(t){const i=this.container,e=this.emitters,o=this.interactivityEmitters;if("emitter"===t){let t;o instanceof Array?o.length>0&&(t=f(o)):t=o;const s=null!=t?t:e instanceof Array?f(e):e,n=i.interactivity.mouse.clickPosition;this.addEmitter(m({},s),n)}}resize(){for(const t of this.array)t.resize()}addEmitter(t,i){const e=new S;e.load(t);const o=new j(F(this,W,"f"),this,this.container,e,i);return this.array.push(o),o}removeEmitter(t){const i=this.array.indexOf(t);i>=0&&this.array.splice(i,1)}}W=new WeakMap;var R,_=function(t,i,e,o,s){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!s:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?s.call(t,e):s?s.value=e:i.set(t,e),e};const B=new Map;class V{constructor(t){R.set(this,void 0),_(this,R,t,"f")}addShape(t,i){this.getShape(t)||B.set(t,i)}getShape(t){return B.get(t)}getSupportedShapes(){return B.keys()}}function L(t,i){return t+i*(Math.random()-.5)}R=new WeakMap;class N{randomPosition(t,i,e){if(e)return{x:L(t.x,i.width),y:L(t.y,i.height)};{const e=i.width/2,o=i.height/2,s=Math.floor(4*Math.random()),n=2*(Math.random()-.5);switch(s){case 0:return{x:t.x+n*e,y:t.y-o};case 1:return{x:t.x-e,y:t.y+n*o};case 2:return{x:t.x+n*e,y:t.y+o};case 3:default:return{x:t.x+e,y:t.y+n*o}}}}}var $,G=function(t,i,e,o,s){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!s:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?s.call(t,e):s?s.value=e:i.set(t,e),e},U=function(t,i,e,o){if("a"===e&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!o:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?o:"a"===e?o.call(t):o?o.value:i.get(t)};class H{constructor(t){$.set(this,void 0),G(this,$,t,"f"),this.id="emitters"}getPlugin(t){return new q(U(this,$,"f"),t)}needsPlugin(t){var i,e,o;if(void 0===t)return!1;const s=t.emitters;return s instanceof Array&&!!s.length||void 0!==s||!!(null===(o=null===(e=null===(i=t.interactivity)||void 0===i?void 0:i.events)||void 0===e?void 0:e.onClick)||void 0===o?void 0:o.mode)&&p("emitter",t.interactivity.events.onClick.mode)}loadOptions(t,i){var e,o;if(!this.needsPlugin(t)&&!this.needsPlugin(i))return;const s=t;if(null==i?void 0:i.emitters)if((null==i?void 0:i.emitters)instanceof Array)s.emitters=null==i?void 0:i.emitters.map((t=>{const i=new S;return i.load(t),i}));else{let t=s.emitters;void 0===(null==t?void 0:t.load)&&(s.emitters=t=new S),t.load(null==i?void 0:i.emitters)}const n=null===(o=null===(e=null==i?void 0:i.interactivity)||void 0===e?void 0:e.modes)||void 0===o?void 0:o.emitters;if(n)if(n instanceof Array)s.interactivity.modes.emitters=n.map((t=>{const i=new S;return i.load(t),i}));else{let t=s.interactivity.modes.emitters;void 0===(null==t?void 0:t.load)&&(s.interactivity.modes.emitters=t=new S),t.load(n)}}}async function J(t){t.emitterShapeManager||(t.emitterShapeManager=new V(t)),t.addEmitterShape||(t.addEmitterShape=(i,e)=>{var o;null===(o=t.emitterShapeManager)||void 0===o||o.addShape(i,e)});const i=new H(t);await t.addPlugin(i),t.addEmitterShape("circle",new e),t.addEmitterShape("square",new N)}return $=new WeakMap,i}()}));
|
|
@@ -1322,9 +1322,9 @@
|
|
|
1322
1322
|
paint() {
|
|
1323
1323
|
const options = this.container.actualOptions;
|
|
1324
1324
|
this.draw((ctx => {
|
|
1325
|
-
if (options.backgroundMask.enable && options.backgroundMask.cover
|
|
1325
|
+
if (options.backgroundMask.enable && options.backgroundMask.cover) {
|
|
1326
1326
|
clear(ctx, this.size);
|
|
1327
|
-
this.paintBase(
|
|
1327
|
+
this.paintBase(this.coverColorStyle);
|
|
1328
1328
|
} else {
|
|
1329
1329
|
this.paintBase();
|
|
1330
1330
|
}
|
|
@@ -1367,11 +1367,16 @@
|
|
|
1367
1367
|
const container = this.container;
|
|
1368
1368
|
const pxRatio = container.retina.pixelRatio;
|
|
1369
1369
|
const size = container.canvas.size;
|
|
1370
|
+
const newSize = {
|
|
1371
|
+
width: this.element.offsetWidth * pxRatio,
|
|
1372
|
+
height: this.element.offsetHeight * pxRatio
|
|
1373
|
+
};
|
|
1374
|
+
if (newSize.height === size.height && newSize.width === size.width && newSize.height === this.element.height && newSize.width === this.element.width) {
|
|
1375
|
+
return;
|
|
1376
|
+
}
|
|
1370
1377
|
const oldSize = Object.assign({}, size);
|
|
1371
|
-
size.width = this.element.offsetWidth * pxRatio;
|
|
1372
|
-
size.height = this.element.offsetHeight * pxRatio;
|
|
1373
|
-
this.element.width = size.width;
|
|
1374
|
-
this.element.height = size.height;
|
|
1378
|
+
this.element.width = size.width = this.element.offsetWidth * pxRatio;
|
|
1379
|
+
this.element.height = size.height = this.element.offsetHeight * pxRatio;
|
|
1375
1380
|
if (this.container.started) {
|
|
1376
1381
|
this.resizeFactor = {
|
|
1377
1382
|
width: size.width / oldSize.width,
|
|
@@ -1495,12 +1500,13 @@
|
|
|
1495
1500
|
const color = cover.color;
|
|
1496
1501
|
const coverRgb = colorToRgb(color);
|
|
1497
1502
|
if (coverRgb) {
|
|
1498
|
-
|
|
1503
|
+
const coverColor = {
|
|
1499
1504
|
r: coverRgb.r,
|
|
1500
1505
|
g: coverRgb.g,
|
|
1501
1506
|
b: coverRgb.b,
|
|
1502
1507
|
a: cover.opacity
|
|
1503
1508
|
};
|
|
1509
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1504
1510
|
}
|
|
1505
1511
|
}
|
|
1506
1512
|
initTrail() {
|
|
@@ -3687,10 +3693,9 @@
|
|
|
3687
3693
|
delete container.canvas.resizeFactor;
|
|
3688
3694
|
}
|
|
3689
3695
|
async draw(delta) {
|
|
3690
|
-
const container = this.container;
|
|
3691
|
-
container.canvas.clear();
|
|
3692
|
-
const canvasSize = this.container.canvas.size;
|
|
3696
|
+
const container = this.container, canvasSize = this.container.canvas.size;
|
|
3693
3697
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
3698
|
+
container.canvas.clear();
|
|
3694
3699
|
await this.update(delta);
|
|
3695
3700
|
if (this.needsSort) {
|
|
3696
3701
|
this.zArray.sort(((a, b) => b.position.z - a.position.z || a.id - b.id));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.4 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 i in n)("object"==typeof exports?exports:t)[i]=n[i]}}(window,(function(){return function(){"use strict";var t,e,n,i,o,r={},s={};function a(t){var e=s[t];if(void 0!==e)return e.exports;var n=s[t]={exports:{}};return r[t](n,n.exports,a),n.exports}a.m=r,t=[],a.O=function(e,n,i,o){if(!n){var r=1/0;for(c=0;c<t.length;c++){n=t[c][0],i=t[c][1],o=t[c][2];for(var s=!0,l=0;l<n.length;l++)(!1&o||r>=o)&&Object.keys(a.O).every((function(t){return a.O[t](n[l])}))?n.splice(l--,1):(s=!1,o<r&&(r=o));if(s){t.splice(c--,1);var h=i();void 0!==h&&(e=h)}}return e}o=o||0;for(var c=t.length;c>0&&t[c-1][2]>o;c--)t[c]=t[c-1];t[c]=[n,i,o]},a.F={},a.E=function(t){Object.keys(a.F).map((function(e){a.F[e](t)}))},n=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__},a.t=function(t,i){if(1&i&&(t=this(t)),8&i)return t;if("object"==typeof t&&t){if(4&i&&t.__esModule)return t;if(16&i&&"function"==typeof t.then)return t}var o=Object.create(null);a.r(o);var r={};e=e||[null,n({}),n([]),n(n)];for(var s=2&i&&t;"object"==typeof s&&!~e.indexOf(s);s=n(s))Object.getOwnPropertyNames(s).forEach((function(e){r[e]=function(){return t[e]}}));return r.default=function(){return t},a.d(o,r),o},a.d=function(t,e){for(var n in e)a.o(e,n)&&!a.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},a.f={},a.e=function(t){return Promise.all(Object.keys(a.f).reduce((function(e,n){return a.f[n](t,e),e}),[]))},a.u=function(t){return"tsparticles.pathseg.min.js"},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i={},o="tsparticles:",a.l=function(t,e,n,r){if(i[t])i[t].push(e);else{var s,l;if(void 0!==n)for(var h=document.getElementsByTagName("script"),c=0;c<h.length;c++){var u=h[c];if(u.getAttribute("src")==t||u.getAttribute("data-webpack")==o+n){s=u;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.setAttribute("data-webpack",o+n),s.src=t),i[t]=[e];var d=function(e,n){s.onerror=s.onload=null,clearTimeout(p);var o=i[t];if(delete i[t],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((function(t){return t(n)})),e)return e(n)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),l&&document.head.appendChild(s)}},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;a.g.importScripts&&(t=a.g.location+"");var e=a.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=t}(),function(){var t={475:0,143:0};a.f.j=function(e,n){var i=a.o(t,e)?t[e]:void 0;if(0!==i)if(i)n.push(i[2]);else{var o=new Promise((function(n,o){i=t[e]=[n,o]}));n.push(i[2]=o);var r=a.p+a.u(e),s=new Error;a.l(r,(function(n){if(a.o(t,e)&&(0!==(i=t[e])&&(t[e]=void 0),i)){var o=n&&("load"===n.type?"missing":n.type),r=n&&n.target&&n.target.src;s.message="Loading chunk "+e+" failed.\n("+o+": "+r+")",s.name="ChunkLoadError",s.type=o,s.request=r,i[1](s)}}),"chunk-"+e,e)}},a.F.j=function(e){if(!a.o(t,e)||void 0===t[e]){t[e]=null;var n=document.createElement("link");a.nc&&n.setAttribute("nonce",a.nc),n.rel="prefetch",n.as="script",n.href=a.p+a.u(e),document.head.appendChild(n)}},a.O.j=function(e){return 0===t[e]};var e=function(e,n){var i,o,r=n[0],s=n[1],l=n[2],h=0;if(r.some((function(e){return 0!==t[e]}))){for(i in s)a.o(s,i)&&(a.m[i]=s[i]);if(l)var c=l(a)}for(e&&e(n);h<r.length;h++)o=r[h],a.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return a.O(c)},n=window.webpackChunktsparticles=window.webpackChunktsparticles||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))}(),a.O(0,[475],(function(){a.E(404)}),5);var l={};a.r(l),a.d(l,{loadPolygonMaskPlugin:function(){return G}});class h{constructor(){this.value="#fff"}static create(t,e){const n=new h;return n.load(t),void 0!==e&&("string"==typeof e||e instanceof Array?n.load({value:e}):n.load(e)),n}load(t){void 0!==(null==t?void 0:t.value)&&(this.value=t.value)}}class c{}c.generatedAttribute="generated",c.randomColorValue="random",c.midColorValue="mid",c.touchEndEvent="touchend",c.mouseDownEvent="mousedown",c.mouseUpEvent="mouseup",c.mouseMoveEvent="mousemove",c.touchStartEvent="touchstart",c.touchMoveEvent="touchmove",c.mouseLeaveEvent="mouseleave",c.mouseOutEvent="mouseout",c.touchCancelEvent="touchcancel",c.resizeEvent="resize",c.visibilityChangeEvent="visibilitychange",c.noPolygonDataLoaded="No polygon data loaded.",c.noPolygonFound="No polygon found, you need to specify SVG url in config.";new WeakMap;new WeakMap;class u{constructor(t,e){let n,i;if(void 0===e){if("number"==typeof t)throw new Error("tsParticles - Vector not initialized correctly");const e=t;[n,i]=[e.x,e.y]}else[n,i]=[t,e];this.x=n,this.y=i}static clone(t){return u.create(t.x,t.y)}static create(t,e){return new u(t,e)}static get origin(){return u.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 u.create(this.x+t.x,this.y+t.y)}addTo(t){this.x+=t.x,this.y+=t.y}sub(t){return u.create(this.x-t.x,this.y-t.y)}subFrom(t){this.x-=t.x,this.y-=t.y}mult(t){return u.create(this.x*t,this.y*t)}multTo(t){this.x*=t,this.y*=t}div(t){return u.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 u.clone(this)}setTo(t){this.x=t.x,this.y=t.y}rotate(t){return u.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 d(t){const e=f(t);let n=p(t);return e===n&&(n=0),Math.random()*(e-n)+n}function p(t){return"number"==typeof t?t:t.min}function f(t){return"number"==typeof t?t:t.max}function v(t,e){if(t===e||void 0===e&&"number"==typeof t)return t;const n=p(t),i=f(t);return void 0!==e?{min:Math.min(n,e),max:Math.max(i,e)}:v(n,i)}function y(t,e){const n=t.x-e.x,i=t.y-e.y;return{dx:n,dy:i,distance:Math.sqrt(n*n+i*i)}}function g(){return"undefined"==typeof window||!window||void 0===window.document||!window.document}function w(t,e,n=!0){return t[void 0!==e&&n?e%t.length:function(t){return Math.floor(Math.random()*t.length)}(t)]}function m(t,...e){for(const n of e){if(null==n)continue;if("object"!=typeof n){t=n;continue}const e=Array.isArray(n);!e||"object"==typeof t&&t&&Array.isArray(t)?e||"object"==typeof t&&t&&!Array.isArray(t)||(t={}):t=[];for(const e in n){if("__proto__"===e)continue;const i=n[e],o="object"==typeof i,r=t;r[e]=o&&Array.isArray(i)?i.map((t=>m(r[e],t))):m(r[e],i)}}return t}function b(t,e,n){let i=n;return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function x(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=E(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=T(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,i,o)=>e+e+n+n+i+i+(void 0!==o?o+o:""))),i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(n);return i?{a:void 0!==i[4]?parseInt(i[4],16)/255:1,b:parseInt(i[3],16),g:parseInt(i[2],16),r:parseInt(i[1],16)}:void 0}}function P(t,e,n=!0){var i,o,r;if(void 0===t)return;const s="string"==typeof t?{value:t}:t;let a;if("string"==typeof s.value)a=s.value===c.randomColorValue?A():function(t){return x(t)}(s.value);else if(s.value instanceof Array){a=P({value:w(s.value,e,n)})}else{const t=s.value,e=null!==(i=t.rgb)&&void 0!==i?i:s.value;if(void 0!==e.r)a=e;else{const e=null!==(o=t.hsl)&&void 0!==o?o:s.value;if(void 0!==e.h&&void 0!==e.l)a=E(e);else{const e=null!==(r=t.hsv)&&void 0!==r?r:s.value;void 0!==e.h&&void 0!==e.v&&(a=T(e))}}}return a}function E(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,i=2*n.l-t;e.r=b(i,t,n.h+1/3),e.g=b(i,t,n.h),e.b=b(i,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 T(t){const e={b:0,g:0,r:0},n=t.h/60,i=t.s/100,o=t.v/100,r=o*i,s=r*(1-Math.abs(n%2-1));let a;if(n>=0&&n<=1?a={r:r,g:s,b:0}:n>1&&n<=2?a={r:s,g:r,b:0}:n>2&&n<=3?a={r:0,g:r,b:s}:n>3&&n<=4?a={r:0,g:s,b:r}:n>4&&n<=5?a={r:s,g:0,b:r}:n>5&&n<=6&&(a={r:r,g:0,b:s}),a){const t=o-r;e.r=Math.floor(255*(a.r+t)),e.g=Math.floor(255*(a.g+t)),e.b=Math.floor(255*(a.b+t))}return e}function A(t){const e=null!=t?t:0;return{b:Math.floor(d(v(e,256))),g:Math.floor(d(v(e,256))),r:Math.floor(d(v(e,256)))}}function S(t,e){return`rgba(${t.r}, ${t.g}, ${t.b}, ${null!=e?e:1})`}new WeakMap;class _{constructor(){this.color=new h,this.width=.5,this.opacity=1}load(t){var e;t&&(this.color=h.create(this.color,t.color),"string"==typeof this.color.value&&(this.opacity=null!==(e=function(t){var e;return null===(e=x(t))||void 0===e?void 0:e.a}(this.color.value))&&void 0!==e?e:this.opacity),void 0!==t.opacity&&(this.opacity=t.opacity),void 0!==t.width&&(this.width=t.width))}}class M{constructor(){this.enable=!1,this.stroke=new _}get lineWidth(){return this.stroke.width}set lineWidth(t){this.stroke.width=t}get lineColor(){return this.stroke.color}set lineColor(t){this.stroke.color=h.create(this.stroke.color,t)}load(t){var e;if(!t)return;void 0!==t.enable&&(this.enable=t.enable);const n=null!==(e=t.stroke)&&void 0!==e?e:{color:t.lineColor,width:t.lineWidth};this.stroke.load(n)}}class O{constructor(){this.arrangement="one-per-point"}load(t){t&&void 0!==t.arrangement&&(this.arrangement=t.arrangement)}}class k{constructor(){this.path=[],this.size={height:0,width:0}}load(t){t&&(void 0!==t.path&&(this.path=t.path),void 0!==t.size&&(void 0!==t.size.width&&(this.size.width=t.size.width),void 0!==t.size.height&&(this.size.height=t.size.height)))}}class I{constructor(){this.radius=10,this.type="path"}load(t){t&&(void 0!==t.radius&&(this.radius=t.radius),void 0!==t.type&&(this.type=t.type))}}class R{constructor(){this.draw=new M,this.enable=!1,this.inline=new O,this.move=new I,this.scale=1,this.type="none"}get inlineArrangement(){return this.inline.arrangement}set inlineArrangement(t){this.inline.arrangement=t}load(t){var e;if(!t)return;this.draw.load(t.draw);const n=null!==(e=t.inline)&&void 0!==e?e:{arrangement:t.inlineArrangement};void 0!==n&&this.inline.load(n),this.move.load(t.move),void 0!==t.scale&&(this.scale=t.scale),void 0!==t.type&&(this.type=t.type),void 0!==t.enable?this.enable=t.enable:this.enable="none"!==this.type,void 0!==t.url&&(this.url=t.url),void 0!==t.data&&("string"==typeof t.data?this.data=t.data:(this.data=new k,this.data.load(t.data))),void 0!==t.position&&(this.position=m({},t.position))}}function C(t,e,n){const i=P(n.color);if(i){t.beginPath(),t.moveTo(e[0].x,e[0].y);for(const n of e)t.lineTo(n.x,n.y);t.closePath(),t.strokeStyle=S(i),t.lineWidth=n.width,t.stroke()}}function L(t,e,n,i){t.translate(i.x,i.y);const o=P(n.color);o&&(t.strokeStyle=S(o,n.opacity),t.lineWidth=n.width,t.stroke(e))}function j(t,e,n){const{dx:i,dy:o}=y(n,t),{dx:r,dy:s}=y(e,t),a=(i*r+o*s)/(r**2+s**2),l={x:t.x+r*a,y:t.x+s*a,isOnSegment:a>=0&&a<=1};return a<0?(l.x=t.x,l.y=t.y):a>1&&(l.x=e.x,l.y=e.y),l}function B(t,e,n){const{dx:i,dy:o}=y(t,e),r=Math.atan2(o,i),s=u.create(Math.sin(r),-Math.cos(r)),a=2*(n.x*s.x+n.y*s.y);s.multTo(a),n.subFrom(s)}class H{constructor(t){this.container=t,this.dimension={height:0,width:0},this.path2DSupported=!!window.Path2D,this.options=new R,this.polygonMaskMoveRadius=this.options.move.radius*t.retina.pixelRatio}async initAsync(t){this.options.load(null==t?void 0:t.polygon);const e=this.options;this.polygonMaskMoveRadius=e.move.radius*this.container.retina.pixelRatio,e.enable&&await this.initRawData()}resize(){const t=this.container,e=this.options;e.enable&&"none"!==e.type&&(this.redrawTimeout&&clearTimeout(this.redrawTimeout),this.redrawTimeout=window.setTimeout((async()=>{await this.initRawData(!0),await t.particles.redraw()}),250))}stop(){delete this.raw,delete this.paths}particlesInitialization(){const t=this.options;return!(!t.enable||"inline"!==t.type||"one-per-point"!==t.inline.arrangement&&"per-point"!==t.inline.arrangement)&&(this.drawPoints(),!0)}particlePosition(t){var e,n;if(this.options.enable&&(null!==(n=null===(e=this.raw)||void 0===e?void 0:e.length)&&void 0!==n?n:0)>0)return m({},t||this.randomPoint())}particleBounce(t,e,n){return this.polygonBounce(t,e,n)}clickPositionValid(t){const e=this.options;return e.enable&&"none"!==e.type&&"inline"!==e.type&&this.checkInsidePolygon(t)}draw(t){var e;if(!(null===(e=this.paths)||void 0===e?void 0:e.length))return;const n=this.options,i=n.draw;if(!n.enable||!i.enable)return;const o=this.raw;for(const e of this.paths){const n=e.path2d,r=this.path2DSupported;t&&(r&&n&&this.offset?L(t,n,i.stroke,this.offset):o&&C(t,o,i.stroke))}}polygonBounce(t,e,n){const i=this.options;if(!this.raw||!i.enable||"top"!==n)return!1;if("inside"===i.type||"outside"===i.type){let e,n,i;const o=t.getPosition(),r=t.getRadius();for(let s=0,a=this.raw.length-1;s<this.raw.length;a=s++){const l=this.raw[s],h=this.raw[a];e=j(l,h,o);const c=y(o,e);if([n,i]=[c.dx,c.dy],c.distance<r)return B(l,h,t.velocity),!0}if(e&&void 0!==n&&void 0!==i&&!this.checkInsidePolygon(o)){const n={x:1,y:1};return t.position.x>=e.x&&(n.x=-1),t.position.y>=e.y&&(n.y=-1),t.position.x=e.x+2*r*n.x,t.position.y=e.y+2*r*n.y,t.velocity.mult(-1),!0}}else if("inline"===i.type&&t.initialPosition){if((o=t.initialPosition,r=t.getPosition(),y(o,r).distance)>this.polygonMaskMoveRadius)return t.velocity.x=t.velocity.y/2-t.velocity.x,t.velocity.y=t.velocity.x/2-t.velocity.y,!0}var o,r;return!1}checkInsidePolygon(t){var e,n;const i=this.container,o=this.options;if(!o.enable||"none"===o.type||"inline"===o.type)return!0;if(!this.raw)throw new Error(c.noPolygonFound);const r=i.canvas.size,s=null!==(e=null==t?void 0:t.x)&&void 0!==e?e:Math.random()*r.width,a=null!==(n=null==t?void 0:t.y)&&void 0!==n?n:Math.random()*r.height;let l=!1;for(let t=0,e=this.raw.length-1;t<this.raw.length;e=t++){const n=this.raw[t],i=this.raw[e];n.y>a!=i.y>a&&s<(i.x-n.x)*(a-n.y)/(i.y-n.y)+n.x&&(l=!l)}return"inside"===o.type?l:"outside"===o.type&&!l}parseSvgPath(t,e){var n,i,o;const r=null!=e&&e;if(void 0!==this.paths&&!r)return this.raw;const s=this.container,a=this.options,l=(new DOMParser).parseFromString(t,"image/svg+xml"),h=l.getElementsByTagName("svg")[0];let c=h.getElementsByTagName("path");c.length||(c=l.getElementsByTagName("path")),this.paths=[];for(let t=0;t<c.length;t++){const e=c.item(t);e&&this.paths.push({element:e,length:e.getTotalLength()})}const u=s.retina.pixelRatio,d=a.scale/u;this.dimension.width=parseFloat(null!==(n=h.getAttribute("width"))&&void 0!==n?n:"0")*d,this.dimension.height=parseFloat(null!==(i=h.getAttribute("height"))&&void 0!==i?i:"0")*d;const p=null!==(o=a.position)&&void 0!==o?o:{x:50,y:50};return this.offset={x:s.canvas.size.width*p.x/(100*u)-this.dimension.width/2,y:s.canvas.size.height*p.y/(100*u)-this.dimension.height/2},function(t,e,n){var i;const o=[];for(const r of t){const t=r.element.pathSegList,s=null!==(i=null==t?void 0:t.numberOfItems)&&void 0!==i?i:0,a={x:0,y:0};for(let i=0;i<s;i++){const r=null==t?void 0:t.getItem(i),s=window.SVGPathSeg;switch(null==r?void 0:r.pathSegType){case s.PATHSEG_MOVETO_ABS:case s.PATHSEG_LINETO_ABS:case s.PATHSEG_CURVETO_CUBIC_ABS:case s.PATHSEG_CURVETO_QUADRATIC_ABS:case s.PATHSEG_ARC_ABS:case s.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:case s.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:{const t=r;a.x=t.x,a.y=t.y;break}case s.PATHSEG_LINETO_HORIZONTAL_ABS:a.x=r.x;break;case s.PATHSEG_LINETO_VERTICAL_ABS:a.y=r.y;break;case s.PATHSEG_LINETO_REL:case s.PATHSEG_MOVETO_REL:case s.PATHSEG_CURVETO_CUBIC_REL:case s.PATHSEG_CURVETO_QUADRATIC_REL:case s.PATHSEG_ARC_REL:case s.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:case s.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:{const t=r;a.x+=t.x,a.y+=t.y;break}case s.PATHSEG_LINETO_HORIZONTAL_REL:a.x+=r.x;break;case s.PATHSEG_LINETO_VERTICAL_REL:a.y+=r.y;break;case s.PATHSEG_UNKNOWN:case s.PATHSEG_CLOSEPATH:continue}o.push({x:a.x*e+n.x,y:a.y*e+n.y})}}return o}(this.paths,d,this.offset)}async downloadSvgPath(t,e){const n=this.options,i=t||n.url,o=null!=e&&e;if(!i||void 0!==this.paths&&!o)return this.raw;const r=await fetch(i);if(!r.ok)throw new Error("tsParticles Error - Error occurred during polygon mask download");return this.parseSvgPath(await r.text(),e)}drawPoints(){if(this.raw)for(const t of this.raw)this.container.particles.addParticle({x:t.x,y:t.y})}randomPoint(){const t=this.container,e=this.options;let n;if("inline"===e.type)switch(e.inline.arrangement){case"random-point":n=this.getRandomPoint();break;case"random-length":n=this.getRandomPointByLength();break;case"equidistant":n=this.getEquidistantPointByIndex(t.particles.count);break;case"one-per-point":case"per-point":default:n=this.getPointByIndex(t.particles.count)}else n={x:Math.random()*t.canvas.size.width,y:Math.random()*t.canvas.size.height};return this.checkInsidePolygon(n)?n:this.randomPoint()}getRandomPoint(){if(!this.raw||!this.raw.length)throw new Error(c.noPolygonDataLoaded);const t=w(this.raw);return{x:t.x,y:t.y}}getRandomPointByLength(){var t,e,n;const i=this.options;if(!this.raw||!this.raw.length||!(null===(t=this.paths)||void 0===t?void 0:t.length))throw new Error(c.noPolygonDataLoaded);const o=w(this.paths),r=Math.floor(Math.random()*o.length)+1,s=o.element.getPointAtLength(r);return{x:s.x*i.scale+((null===(e=this.offset)||void 0===e?void 0:e.x)||0),y:s.y*i.scale+((null===(n=this.offset)||void 0===n?void 0:n.y)||0)}}getEquidistantPointByIndex(t){var e,n,i,o,r,s,a;const l=this.container.actualOptions,h=this.options;if(!this.raw||!this.raw.length||!(null===(e=this.paths)||void 0===e?void 0:e.length))throw new Error(c.noPolygonDataLoaded);let u,d=0;const p=this.paths.reduce(((t,e)=>t+e.length),0)/l.particles.number.value;for(const e of this.paths){const n=p*t-d;if(n<=e.length){u=e.element.getPointAtLength(n);break}d+=e.length}return{x:(null!==(n=null==u?void 0:u.x)&&void 0!==n?n:0)*h.scale+(null!==(o=null===(i=this.offset)||void 0===i?void 0:i.x)&&void 0!==o?o:0),y:(null!==(r=null==u?void 0:u.y)&&void 0!==r?r:0)*h.scale+(null!==(a=null===(s=this.offset)||void 0===s?void 0:s.y)&&void 0!==a?a:0)}}getPointByIndex(t){if(!this.raw||!this.raw.length)throw new Error(c.noPolygonDataLoaded);const e=this.raw[t%this.raw.length];return{x:e.x,y:e.y}}createPath2D(){var t,e;const n=this.options;if(this.path2DSupported&&(null===(t=this.paths)||void 0===t?void 0:t.length))for(const t of this.paths){const i=null===(e=t.element)||void 0===e?void 0:e.getAttribute("d");if(i){const e=new Path2D(i),o=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGMatrix(),r=new Path2D,s=o.scale(n.scale);r.addPath?(r.addPath(e,s),t.path2d=r):delete t.path2d}else delete t.path2d;!t.path2d&&this.raw&&(t.path2d=new Path2D,t.path2d.moveTo(this.raw[0].x,this.raw[0].y),this.raw.forEach(((e,n)=>{var i;n>0&&(null===(i=t.path2d)||void 0===i||i.lineTo(e.x,e.y))})),t.path2d.closePath())}}async initRawData(t){const e=this.options;if(e.url)this.raw=await this.downloadSvgPath(e.url,t);else if(e.data){const n=e.data;let i;if("string"!=typeof n){const t=n.path instanceof Array?n.path.map((t=>`<path d="${t}" />`)).join(""):`<path d="${n.path}" />`;i=`<svg ${'xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"'} width="${n.size.width}" height="${n.size.height}">${t}</svg>`}else i=n;this.raw=this.parseSvgPath(i,t)}this.createPath2D()}}class D{constructor(){this.id="polygonMask"}getPlugin(t){return new H(t)}needsPlugin(t){var e,n,i;return null!==(n=null===(e=null==t?void 0:t.polygon)||void 0===e?void 0:e.enable)&&void 0!==n?n:void 0!==(null===(i=null==t?void 0:t.polygon)||void 0===i?void 0:i.type)&&"none"!==t.polygon.type}loadOptions(t,e){if(!this.needsPlugin(e))return;const n=t;let i=n.polygon;void 0===(null==i?void 0:i.load)&&(n.polygon=i=new R),i.load(null==e?void 0:e.polygon)}}async function G(t){g()||"SVGPathSeg"in window||await a.e(404).then(a.t.bind(a,167,23));const e=new D;await t.addPlugin(e)}return l=a.O(l)}()}));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.4 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={};e.r(t),e.d(t,{loadCircleShape:function(){return n}});class o{getSidesCount(){return 12}draw(e,t,o){e.arc(0,0,o,0,2*Math.PI,!1)}}async function n(e){await e.addShape("circle",new o)}return t}()}));
|
|
@@ -941,9 +941,9 @@
|
|
|
941
941
|
paint() {
|
|
942
942
|
const options = this.container.actualOptions;
|
|
943
943
|
this.draw((ctx => {
|
|
944
|
-
if (options.backgroundMask.enable && options.backgroundMask.cover
|
|
944
|
+
if (options.backgroundMask.enable && options.backgroundMask.cover) {
|
|
945
945
|
clear(ctx, this.size);
|
|
946
|
-
this.paintBase(
|
|
946
|
+
this.paintBase(this.coverColorStyle);
|
|
947
947
|
} else {
|
|
948
948
|
this.paintBase();
|
|
949
949
|
}
|
|
@@ -986,11 +986,16 @@
|
|
|
986
986
|
const container = this.container;
|
|
987
987
|
const pxRatio = container.retina.pixelRatio;
|
|
988
988
|
const size = container.canvas.size;
|
|
989
|
+
const newSize = {
|
|
990
|
+
width: this.element.offsetWidth * pxRatio,
|
|
991
|
+
height: this.element.offsetHeight * pxRatio
|
|
992
|
+
};
|
|
993
|
+
if (newSize.height === size.height && newSize.width === size.width && newSize.height === this.element.height && newSize.width === this.element.width) {
|
|
994
|
+
return;
|
|
995
|
+
}
|
|
989
996
|
const oldSize = Object.assign({}, size);
|
|
990
|
-
size.width = this.element.offsetWidth * pxRatio;
|
|
991
|
-
size.height = this.element.offsetHeight * pxRatio;
|
|
992
|
-
this.element.width = size.width;
|
|
993
|
-
this.element.height = size.height;
|
|
997
|
+
this.element.width = size.width = this.element.offsetWidth * pxRatio;
|
|
998
|
+
this.element.height = size.height = this.element.offsetHeight * pxRatio;
|
|
994
999
|
if (this.container.started) {
|
|
995
1000
|
this.resizeFactor = {
|
|
996
1001
|
width: size.width / oldSize.width,
|
|
@@ -1114,12 +1119,13 @@
|
|
|
1114
1119
|
const color = cover.color;
|
|
1115
1120
|
const coverRgb = colorToRgb(color);
|
|
1116
1121
|
if (coverRgb) {
|
|
1117
|
-
|
|
1122
|
+
const coverColor = {
|
|
1118
1123
|
r: coverRgb.r,
|
|
1119
1124
|
g: coverRgb.g,
|
|
1120
1125
|
b: coverRgb.b,
|
|
1121
1126
|
a: cover.opacity
|
|
1122
1127
|
};
|
|
1128
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1123
1129
|
}
|
|
1124
1130
|
}
|
|
1125
1131
|
initTrail() {
|
|
@@ -3306,10 +3312,9 @@
|
|
|
3306
3312
|
delete container.canvas.resizeFactor;
|
|
3307
3313
|
}
|
|
3308
3314
|
async draw(delta) {
|
|
3309
|
-
const container = this.container;
|
|
3310
|
-
container.canvas.clear();
|
|
3311
|
-
const canvasSize = this.container.canvas.size;
|
|
3315
|
+
const container = this.container, canvasSize = this.container.canvas.size;
|
|
3312
3316
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
3317
|
+
container.canvas.clear();
|
|
3313
3318
|
await this.update(delta);
|
|
3314
3319
|
if (this.needsSort) {
|
|
3315
3320
|
this.zArray.sort(((a, b) => b.position.z - a.position.z || a.id - b.id));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.4 by Matteo Bruni */
|
|
2
2
|
!function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o();else if("function"==typeof define&&define.amd)define([],o);else{var t=o();for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(window,(function(){return function(){"use strict";var e={d:function(o,t){for(var r in t)e.o(t,r)&&!e.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:t[r]})},o:function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{loadImageShape:function(){return g}});class t{}t.generatedAttribute="generated",t.randomColorValue="random",t.midColorValue="mid",t.touchEndEvent="touchend",t.mouseDownEvent="mousedown",t.mouseUpEvent="mouseup",t.mouseMoveEvent="mousemove",t.touchStartEvent="touchstart",t.touchMoveEvent="touchmove",t.mouseLeaveEvent="mouseleave",t.mouseOutEvent="mouseout",t.touchCancelEvent="touchcancel",t.resizeEvent="resize",t.visibilityChangeEvent="visibilitychange",t.noPolygonDataLoaded="No polygon data loaded.",t.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;function r(e,o){return`hsla(${e.h}, ${e.s}%, ${e.l}%, ${null!=o?o:1})`}new WeakMap;const a=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function n(e){return new Promise((o=>{e.loading=!0;const t=new Image;t.addEventListener("load",(()=>{e.element=t,e.loading=!1,o()})),t.addEventListener("error",(()=>{e.error=!0,e.loading=!1,console.error(`Error tsParticles - loading image: ${e.source}`),o()})),t.src=e.source}))}async function i(e){if("svg"!==e.type)return void await n(e);e.loading=!0;const o=await fetch(e.source);e.loading=!1,o.ok||(console.error("Error tsParticles - Image not found"),e.error=!0),e.error||(e.svgData=await o.text())}function s(e,o,t,i){var s,l,c;const d=function(e,o,t){const{svgData:n}=e;if(!n)return"";const i=r(o,t);if(n.includes("fill"))return n.replace(a,(()=>i));const s=n.indexOf(">");return`${n.substring(0,s)} fill="${i}"${n.substring(s)}`}(e,t,null!==(l=null===(s=i.opacity)||void 0===s?void 0:s.value)&&void 0!==l?l:1),u=new Blob([d],{type:"image/svg+xml"}),g=URL||window.URL||window.webkitURL||window,f=g.createObjectURL(u),v=new Image,m={data:Object.assign(Object.assign({},e),{svgData:d}),ratio:o.width/o.height,replaceColor:null!==(c=o.replaceColor)&&void 0!==c?c:o.replace_color,source:o.src};return v.addEventListener("load",(()=>{const o=i.image;o&&(o.loaded=!0,e.element=v),g.revokeObjectURL(f)})),v.addEventListener("error",(()=>{g.revokeObjectURL(f);const o=Object.assign(Object.assign({},e),{error:!1,loading:!0});n(o).then((()=>{const t=i.image;t&&(e.element=o.element,t.loaded=!0)}))})),v.src=f,m}var l,c=function(e,o,t,r,a){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof o?e!==o||!a:!o.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?a.call(e,t):a?a.value=t:o.set(e,t),t},d=function(e,o,t,r){if("a"===t&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof o?e!==o||!r:!o.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?r:"a"===t?r.call(e):r?r.value:o.get(e)};class u{constructor(){l.set(this,void 0),c(this,l,[],"f")}getSidesCount(){return 12}getImages(e){const o=d(this,l,"f").find((o=>o.id===e.id));return o||(d(this,l,"f").push({id:e.id,images:[]}),this.getImages(e))}addImage(e,o){const t=this.getImages(e);null==t||t.images.push(o)}destroy(){c(this,l,[],"f")}async loadImageShape(e,o){const t=o.src;if(!t)throw new Error("Error tsParticles - No image.src");try{const r={source:t,type:t.substr(t.length-3),error:!1,loading:!0};this.addImage(e,r);const a=o.replaceColor?i:n;await a(r)}catch(e){throw new Error(`tsParticles error - ${o.src} not found`)}}draw(e,o,t,r){var a,n;const i=o.image,s=null===(a=null==i?void 0:i.data)||void 0===a?void 0:a.element;if(!s)return;const l=null!==(n=null==i?void 0:i.ratio)&&void 0!==n?n:1,c={x:-t,y:-t};(null==i?void 0:i.data.svgData)&&(null==i?void 0:i.replaceColor)||(e.globalAlpha=r),e.drawImage(s,c.x,c.y,2*t,2*t/l),(null==i?void 0:i.data.svgData)&&(null==i?void 0:i.replaceColor)||(e.globalAlpha=1)}loadShape(e){var o,t,r;if("image"!==e.shape&&"images"!==e.shape)return;const a=this.getImages(e.container).images,n=e.shapeData,i=a.find((e=>e.source===n.src));let l;if(!i)return void this.loadImageShape(e.container,n).then((()=>{this.loadShape(e)}));if(i.error)return;const c=e.getFillColor();l=i.svgData&&n.replaceColor&&c?s(i,n,c,e):{data:i,loaded:!0,ratio:n.width/n.height,replaceColor:null!==(o=n.replaceColor)&&void 0!==o?o:n.replace_color,source:n.src},l.ratio||(l.ratio=1);const d={image:l,fill:null!==(t=n.fill)&&void 0!==t?t:e.fill,close:null!==(r=n.close)&&void 0!==r?r:e.close};e.image=d.image,e.fill=d.fill,e.close=d.close}}async function g(e){const o=new u;await e.addShape("image",o),await e.addShape("images",o)}return l=new WeakMap,o}()}));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.4 by Matteo Bruni */
|
|
2
2
|
!function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o();else if("function"==typeof define&&define.amd)define([],o);else{var t=o();for(var n in t)("object"==typeof exports?exports:e)[n]=t[n]}}(window,(function(){return function(){"use strict";var e={d:function(o,t){for(var n in t)e.o(t,n)&&!e.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:t[n]})},o:function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{loadLineShape:function(){return n}});class t{getSidesCount(){return 1}draw(e,o,t){e.moveTo(-t/2,0),e.lineTo(t/2,0)}}async function n(e){await e.addShape("line",new t)}return o}()}));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.4 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={};e.r(t),e.d(t,{loadGenericPolygonShape:function(){return a},loadPolygonShape:function(){return u},loadTriangleShape:function(){return i}});class n{getSidesCount(e){var t,n;const o=e.shapeData;return null!==(n=null!==(t=null==o?void 0:o.sides)&&void 0!==t?t:null==o?void 0:o.nb_sides)&&void 0!==n?n:5}draw(e,t,n){const o=this.getCenter(t,n),r=this.getSidesData(t,n),a=r.count.numerator*r.count.denominator,i=r.count.numerator/r.count.denominator,u=180*(i-2)/i,l=Math.PI-Math.PI*u/180;if(e){e.beginPath(),e.translate(o.x,o.y),e.moveTo(0,0);for(let t=0;t<a;t++)e.lineTo(r.length,0),e.translate(r.length,0),e.rotate(l)}}}class o extends n{getSidesData(e,t){var n,o;const r=e.shapeData,a=null!==(o=null!==(n=null==r?void 0:r.sides)&&void 0!==n?n:null==r?void 0:r.nb_sides)&&void 0!==o?o:5;return{count:{denominator:1,numerator:a},length:2.66*t/(a/3)}}getCenter(e,t){return{x:-t/(this.getSidesCount(e)/3.5),y:-t/.76}}}class r extends n{getSidesCount(){return 3}getSidesData(e,t){return{count:{denominator:2,numerator:3},length:2*t}}getCenter(e,t){return{x:-t,y:t/1.66}}}async function a(e){await e.addShape("polygon",new o)}async function i(e){await e.addShape("triangle",new r)}async function u(e){await a(e),await i(e)}return t}()}));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.4 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={};e.r(t),e.d(t,{loadSquareShape:function(){return r}});const o=Math.sqrt(2);class n{getSidesCount(){return 4}draw(e,t,n){e.rect(-n/o,-n/o,2*n/o,2*n/o)}}async function r(e){const t=new n;await e.addShape("edge",t),await e.addShape("square",t)}return t}()}));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.4 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={};e.r(t),e.d(t,{loadStarShape:function(){return n}});class o{getSidesCount(e){var t,o;const n=e.shapeData;return null!==(o=null!==(t=null==n?void 0:n.sides)&&void 0!==t?t:null==n?void 0:n.nb_sides)&&void 0!==o?o:5}draw(e,t,o){var n;const r=t.shapeData,i=this.getSidesCount(t),a=null!==(n=null==r?void 0:r.inset)&&void 0!==n?n:2;e.moveTo(0,0-o);for(let t=0;t<i;t++)e.rotate(Math.PI/i),e.lineTo(0,0-o*a),e.rotate(Math.PI/i),e.lineTo(0,0-o)}}async function n(e){await e.addShape("star",new o)}return t}()}));
|
|
@@ -941,9 +941,9 @@
|
|
|
941
941
|
paint() {
|
|
942
942
|
const options = this.container.actualOptions;
|
|
943
943
|
this.draw((ctx => {
|
|
944
|
-
if (options.backgroundMask.enable && options.backgroundMask.cover
|
|
944
|
+
if (options.backgroundMask.enable && options.backgroundMask.cover) {
|
|
945
945
|
clear(ctx, this.size);
|
|
946
|
-
this.paintBase(
|
|
946
|
+
this.paintBase(this.coverColorStyle);
|
|
947
947
|
} else {
|
|
948
948
|
this.paintBase();
|
|
949
949
|
}
|
|
@@ -986,11 +986,16 @@
|
|
|
986
986
|
const container = this.container;
|
|
987
987
|
const pxRatio = container.retina.pixelRatio;
|
|
988
988
|
const size = container.canvas.size;
|
|
989
|
+
const newSize = {
|
|
990
|
+
width: this.element.offsetWidth * pxRatio,
|
|
991
|
+
height: this.element.offsetHeight * pxRatio
|
|
992
|
+
};
|
|
993
|
+
if (newSize.height === size.height && newSize.width === size.width && newSize.height === this.element.height && newSize.width === this.element.width) {
|
|
994
|
+
return;
|
|
995
|
+
}
|
|
989
996
|
const oldSize = Object.assign({}, size);
|
|
990
|
-
size.width = this.element.offsetWidth * pxRatio;
|
|
991
|
-
size.height = this.element.offsetHeight * pxRatio;
|
|
992
|
-
this.element.width = size.width;
|
|
993
|
-
this.element.height = size.height;
|
|
997
|
+
this.element.width = size.width = this.element.offsetWidth * pxRatio;
|
|
998
|
+
this.element.height = size.height = this.element.offsetHeight * pxRatio;
|
|
994
999
|
if (this.container.started) {
|
|
995
1000
|
this.resizeFactor = {
|
|
996
1001
|
width: size.width / oldSize.width,
|
|
@@ -1114,12 +1119,13 @@
|
|
|
1114
1119
|
const color = cover.color;
|
|
1115
1120
|
const coverRgb = colorToRgb(color);
|
|
1116
1121
|
if (coverRgb) {
|
|
1117
|
-
|
|
1122
|
+
const coverColor = {
|
|
1118
1123
|
r: coverRgb.r,
|
|
1119
1124
|
g: coverRgb.g,
|
|
1120
1125
|
b: coverRgb.b,
|
|
1121
1126
|
a: cover.opacity
|
|
1122
1127
|
};
|
|
1128
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1123
1129
|
}
|
|
1124
1130
|
}
|
|
1125
1131
|
initTrail() {
|
|
@@ -3306,10 +3312,9 @@
|
|
|
3306
3312
|
delete container.canvas.resizeFactor;
|
|
3307
3313
|
}
|
|
3308
3314
|
async draw(delta) {
|
|
3309
|
-
const container = this.container;
|
|
3310
|
-
container.canvas.clear();
|
|
3311
|
-
const canvasSize = this.container.canvas.size;
|
|
3315
|
+
const container = this.container, canvasSize = this.container.canvas.size;
|
|
3312
3316
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
3317
|
+
container.canvas.clear();
|
|
3313
3318
|
await this.update(delta);
|
|
3314
3319
|
if (this.needsSort) {
|
|
3315
3320
|
this.zArray.sort(((a, b) => b.position.z - a.position.z || a.id - b.id));
|