@tsparticles/pjs 4.0.0-alpha.2 → 4.0.0-alpha.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/209.min.js +2 -0
- package/209.min.js.LICENSE.txt +1 -0
- package/256.min.js +2 -0
- package/256.min.js.LICENSE.txt +1 -0
- package/380.min.js +2 -0
- package/380.min.js.LICENSE.txt +1 -0
- package/551.min.js +2 -0
- package/551.min.js.LICENSE.txt +1 -0
- package/785.min.js +2 -0
- package/785.min.js.LICENSE.txt +1 -0
- package/824.min.js +2 -0
- package/824.min.js.LICENSE.txt +1 -0
- package/997.min.js +2 -0
- package/997.min.js.LICENSE.txt +1 -0
- package/browser/VincentGarreau/particles.js +5 -5
- package/browser/index.js +6 -1
- package/cjs/VincentGarreau/particles.js +5 -5
- package/cjs/index.js +6 -1
- package/engine_dist_browser_Core_Container_js.js +6 -16
- package/esm/VincentGarreau/particles.js +5 -5
- package/esm/index.js +6 -1
- package/package.json +4 -2
- package/plugins_interactivity_dist_browser_InteractivityPluginInstance_js.js +50 -0
- package/plugins_interactivity_dist_browser_InteractivityPlugin_js.js +70 -0
- package/plugins_interactivity_dist_browser_index_js.js +120 -0
- package/plugins_responsive_dist_browser_ResponsivePluginInstance_js.js +30 -0
- package/plugins_responsive_dist_browser_ResponsivePlugin_js.js +50 -0
- package/plugins_responsive_dist_browser_index_js.js +30 -0
- package/report.html +1 -1
- package/tsparticles.pjs.bundle.js +19 -211
- package/tsparticles.pjs.bundle.min.js +1 -1
- package/tsparticles.pjs.bundle.min.js.LICENSE.txt +1 -1
- package/tsparticles.pjs.js +57 -7
- package/tsparticles.pjs.min.js +1 -1
- package/tsparticles.pjs.min.js.LICENSE.txt +1 -1
- package/types/VincentGarreau/IParticlesJS.d.ts +2 -1
- package/types/VincentGarreau/particles.d.ts +3 -2
- package/umd/VincentGarreau/particles.js +5 -5
- package/umd/index.js +40 -1
- package/571.min.js +0 -2
- package/571.min.js.LICENSE.txt +0 -1
package/209.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 209.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_pjs=this.webpackChunk_tsparticles_pjs||[]).push([[209],{3209(t,i,e){e.d(i,{Container:()=>M});var s=e(7879),n=e(1607),a=e(6093),r=e(5721),o=e(5206);function h(t,i,e){const s=i[e];void 0!==s&&(t[e]=(t[e]??n.zs)*s)}function c(t,i,e=!1){if(!i)return;const s=t.style,n=new Set;for(let t=0;t<s.length;t++){const i=s.item(t);i&&n.add(i)}for(let t=0;t<i.length;t++){const e=i.item(t);e&&n.add(e)}for(const t of n){const n=i.getPropertyValue(t);n?s.setProperty(t,n,e?"important":""):s.removeProperty(t)}}class l{constructor(t,i){this.container=t,this._reusableColorStyles={},this._reusablePluginColors=[void 0,void 0],this._reusableTransform={},this._applyPostDrawUpdaters=t=>{for(const i of this._postDrawUpdaters)i.afterDraw?.(t)},this._applyPreDrawUpdaters=(t,i,e,s,n,a)=>{for(const r of this._preDrawUpdaters){if(r.getColorStyles){const{fill:a,stroke:o}=r.getColorStyles(i,t,e,s);a&&(n.fill=a),o&&(n.stroke=o)}if(r.getTransformValues){const t=r.getTransformValues(i);for(const i in t)h(a,t,i)}r.beforeDraw?.(i)}},this._applyResizePlugins=()=>{for(const t of this._resizePlugins)t.resize?.()},this._getPluginParticleColors=t=>{let i,e;for(const s of this._colorPlugins)if(!i&&s.particleFillColor&&(i=(0,o.R5)(this._engine,s.particleFillColor(t))),!e&&s.particleStrokeColor&&(e=(0,o.R5)(this._engine,s.particleStrokeColor(t))),i&&e)break;return this._reusablePluginColors[0]=i,this._reusablePluginColors[1]=e,this._reusablePluginColors},this._initStyle=()=>{const t=this.element,i=this.container.actualOptions;if(t){this._fullScreen?this._setFullScreenStyle():this._resetOriginalStyle();for(const e in i.style){if(!e||!Object.hasOwn(i.style,e))continue;const s=i.style[e];s&&t.style.setProperty(e,s,"important")}}},this._repairStyle=()=>{const t=this.element;if(!t)return;this._safeMutationObserver((t=>{t.disconnect()})),this._initStyle(),this.initBackground();const i=this._pointerEvents;t.style.pointerEvents=i,t.setAttribute("pointer-events",i),this._safeMutationObserver((i=>{t instanceof Node&&i.observe(t,{attributes:!0})}))},this._resetOriginalStyle=()=>{const t=this.element,i=this._originalStyle;t&&i&&c(t,i,!0)},this._safeMutationObserver=t=>{this._mutationObserver&&t(this._mutationObserver)},this._setFullScreenStyle=()=>{const t=this.element;t&&c(t,(0,r.hJ)(this.container.actualOptions.fullScreen.zIndex),!0)},this._engine=i,this._standardSize={height:0,width:0};const e=t.retina.pixelRatio,s=this._standardSize;this.size={height:s.height*e,width:s.width*e},this._context=null,this._generated=!1,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[],this._pointerEvents="none"}get _fullScreen(){return this.container.actualOptions.fullScreen.enable}canvasClear(){this.container.actualOptions.clear&&this.draw((t=>{(0,a.IU)(t,this.size)}))}clear(){let t=!1;for(const i of this.container.plugins)!t&&i.canvasClear&&(t=i.canvasClear());t||this.canvasClear()}clearDrawPlugin(t,i){this.draw((e=>{(0,a.l7)(e,t,i)}))}destroy(){if(this.stop(),this._generated){const t=this.element;t?.remove(),this.element=void 0}else this._resetOriginalStyle();this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[]}draw(t){const i=this._context;if(i)return t(i)}drawParticle(t,i){if(t.spawning||t.destroyed)return;const e=t.getRadius();if(e<=n.w2)return;const s=t.getFillColor(),r=t.getStrokeColor()??s;let[h,c]=this._getPluginParticleColors(t);if(h??=s,c??=r,!h&&!c)return;const l=this.container,d=t.options.zIndex,p=n.RV-t.zIndexFactor,{opacity:u,strokeOpacity:f}=t.getOpacity(),_=this._reusableTransform,g=this._reusableColorStyles,y=h?(0,o.LC)(h,l.hdr,u):void 0,m=c?(0,o.LC)(c,l.hdr,f):y;_.a=_.b=_.c=_.d=void 0,g.fill=y,g.stroke=m,this.draw((s=>{this._applyPreDrawUpdaters(s,t,e,u,g,_),(0,a.p0)({container:l,context:s,particle:t,delta:i,colorStyles:g,radius:e*p**d.sizeRate,opacity:u,transform:_})})),this._applyPostDrawUpdaters(t)}drawParticlePlugin(t,i,e){this.draw((s=>{(0,a.Wb)(s,t,i,e)}))}drawParticles(t){const{particles:i,plugins:e}=this.container;this.clear(),i.update(t);for(const i of e.values())this.drawPlugin(i,t);this.draw((()=>{i.drawParticles(t)}));for(const i of e.values())this.clearDrawPlugin(i,t)}drawPlugin(t,i){this.draw((e=>{(0,a.e_)(e,t,i)}))}init(){this._safeMutationObserver((t=>{t.disconnect()})),this._mutationObserver=(0,r.tG)((t=>{for(const i of t)"attributes"===i.type&&"style"===i.attributeName&&this._repairStyle()})),this.resize(),this._initStyle(),this.initBackground(),this._safeMutationObserver((t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})})),this.initUpdaters(),this.initPlugins(),this.paint()}initBackground(){const{container:t}=this,i=t.actualOptions.background,e=this.element;if(!e)return;const s=e.style,n=(0,o.BN)(this._engine,i.color);s.backgroundColor=n?(0,o.xx)(n,t.hdr,i.opacity):"",s.backgroundImage=i.image||"",s.backgroundPosition=i.position||"",s.backgroundRepeat=i.repeat||"",s.backgroundSize=i.size||""}initPlugins(){this._resizePlugins=[];for(const t of this.container.plugins)t.resize&&this._resizePlugins.push(t),(t.particleFillColor??t.particleStrokeColor)&&this._colorPlugins.push(t)}initUpdaters(){this._preDrawUpdaters=[],this._postDrawUpdaters=[];for(const t of this.container.particles.updaters)t.afterDraw&&this._postDrawUpdaters.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this._preDrawUpdaters.push(t)}loadCanvas(t){this._generated&&this.element&&this.element.remove();const i=this.container;this._generated=n.eb in t.dataset?"true"===t.dataset[n.eb]:this._generated,this.element=t,this.element.ariaHidden="true",this._originalStyle=(0,r.td)(this.element.style);const e=this._standardSize;e.height=t.offsetHeight,e.width=t.offsetWidth;const s=this.container.retina.pixelRatio,a=this.size;t.height=a.height=e.height*s,t.width=a.width=e.width*s;const o=(0,r.lV)("(color-gamut: p3)");this._context=this.element.getContext("2d",{alpha:!0,colorSpace:o?.matches&&i.hdr?"display-p3":"srgb",desynchronized:!0,willReadFrequently:!1}),this._safeMutationObserver((t=>{t.disconnect()})),i.retina.init(),this.initBackground(),this._safeMutationObserver((t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})}))}paint(){let t=!1;for(const i of this.container.plugins){if(t)break;t=i.canvasPaint?.()??!1}t||this.paintBase()}paintBase(t){this.draw((i=>{(0,a.Sn)(i,this.size,t)}))}paintImage(t,i){this.draw((e=>{(0,a.Md)(e,this.size,t,i)}))}resize(){if(!this.element)return!1;const t=this.container,i=t.canvas._standardSize,e={width:this.element.offsetWidth,height:this.element.offsetHeight},s=t.retina.pixelRatio,n={width:e.width*s,height:e.height*s};if(e.height===i.height&&e.width===i.width&&n.height===this.element.height&&n.width===this.element.width)return!1;const a={...i};i.height=e.height,i.width=e.width;const r=this.size;return this.element.width=r.width=n.width,this.element.height=r.height=n.height,this.container.started&&t.particles.setResizeFactor({width:i.width/a.width,height:i.height/a.height}),!0}setPointerEvents(t){this.element&&(this._pointerEvents=t,this._repairStyle())}stop(){this._safeMutationObserver((t=>{t.disconnect()})),this._mutationObserver=void 0,this.draw((t=>{(0,a.IU)(t,this.size)}))}async windowResize(){if(!this.element||!this.resize())return;const t=this.container,i=t.updateActualOptions();t.particles.setDensity(),this._applyResizePlugins(),i&&await t.refresh()}}class d{constructor(t){this.container=t,this._handleVisibilityChange=()=>{const t=this.container;t.actualOptions.pauseOnBlur&&((0,r.T5)().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))},this._handleWindowResize=()=>{this._resizeTimeout&&(clearTimeout(this._resizeTimeout),delete this._resizeTimeout);const t=async()=>{const t=this.container.canvas;await t.windowResize()};this._resizeTimeout=setTimeout((()=>{t()}),this.container.actualOptions.resize.delay*n.Xu)},this._manageListeners=t=>{const i=this._handlers;this._manageResize(t),(0,r.Kp)(document,n.nK,i.visibilityChange,t,!1)},this._manageResize=t=>{const i=this._handlers,e=this.container;if(!e.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void(0,r.Kp)(globalThis,n.NF,i.resize,t);const s=e.canvas.element;this._resizeObserver&&!t?(s&&this._resizeObserver.unobserve(s),this._resizeObserver.disconnect(),delete this._resizeObserver):!this._resizeObserver&&t&&s&&(this._resizeObserver=new ResizeObserver((t=>{t.find((t=>t.target===s))&&this._handleWindowResize()})),this._resizeObserver.observe(s))},this._handlers={visibilityChange:()=>{this._handleVisibilityChange()},resize:()=>{this._handleWindowResize()}}}addListeners(){this._manageListeners(!0)}removeListeners(){this._manageListeners(!1)}}var p=e(625),u=e(7718),f=e(6284),_=e(918),g=e(9508),y=e(8991),m=e(9239),v=e(4017);function w(t){if(!(0,r.hn)(t.outMode,t.checkModes))return;const i=t.radius*n.gd;t.coord>t.maxCoord-i?t.setCb(-t.radius):t.coord<i&&t.setCb(t.radius)}class b{constructor(t,i){this.container=i,this._cachedOpacityData={opacity:n.hv,strokeOpacity:n.hv},this._cachedPosition=_.p.origin,this._cachedRotateData={sin:0,cos:0},this._cachedTransform={a:1,b:0,c:0,d:1},this._calcPosition=(t,i)=>{let e=n.rq,a=t?_.p.create(t.x,t.y,i):void 0;const r=this.container,o=Array.from(r.plugins),h=this.options.move.outModes,c=this.getRadius(),l=r.canvas.size,d=new AbortController,{signal:p}=d;for(;!p.aborted;){for(const t of o){const e=t.particlePosition?.(a,this);if(e)return _.p.create(e.x,e.y,i)}const t=(0,s.Nx)({size:l,position:a}),r=_.p.create(t.x,t.y,i);this._fixHorizontal(r,c,h.left??h.default),this._fixHorizontal(r,c,h.right??h.default),this._fixVertical(r,c,h.top??h.default),this._fixVertical(r,c,h.bottom??h.default);let d=!0;for(const t of o)if(d=t.checkParticlePosition?.(this,r,e)??!0,!d)break;if(d)return r;e+=n.Eo,a=void 0}return a},this._calculateVelocity=()=>{const t=(0,s.$m)(this.direction).copy(),i=this.options.move;if(i.direction===g.F.inside||i.direction===g.F.outside)return t;const e=(0,s.pu)((0,s.VG)(i.angle.value)),a=(0,s.pu)((0,s.VG)(i.angle.offset)),r={left:a-e*n.MX,right:a+e*n.MX};return i.straight||(t.angle+=(0,s.vE)((0,s.DT)(r.left,r.right))),i.random&&"number"==typeof i.speed&&(t.length*=(0,s.G0)()),t},this._fixHorizontal=(t,i,e)=>{w({outMode:e,checkModes:[y.Y.bounce],coord:t.x,maxCoord:this.container.canvas.size.width,setCb:i=>t.x+=i,radius:i})},this._fixVertical=(t,i,e)=>{w({outMode:e,checkModes:[y.Y.bounce],coord:t.y,maxCoord:this.container.canvas.size.height,setCb:i=>t.y+=i,radius:i})},this._getRollColor=t=>{if(!t||!this.roll||!this.backColor&&!this.roll.alter)return t;const i=this.roll.horizontal&&this.roll.vertical?n.gd*n.l:n.l,e=this.roll.horizontal?Math.PI*n.MX:n.dv;return Math.floor((this.roll.angle+e)/(Math.PI/i))%n.gd?this.backColor?this.backColor:this.roll.alter?(0,a.yx)(t,this.roll.alter.type,this.roll.alter.value):t:t},this._initPosition=t=>{const i=this.container,e=(0,s.VG)(this.options.zIndex.value),a=this._calcPosition(t,(0,s.qE)(e,n.X_,i.zLayers));if(!a)throw new Error("a valid position cannot be found for particle");this.position=a,this.initialPosition=this.position.copy();const o=i.canvas.size;switch(this.moveCenter={...(0,r.E9)(this.options.move.center,o),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=(0,s.JY)(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case g.F.inside:this.outType=m.x.inside;break;case g.F.outside:this.outType=m.x.outside}this.offset=_.M.origin},this._engine=t}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const i=this.container,e=this.pathGenerator,s=this.shape?i.shapeDrawers.get(this.shape):void 0;s?.particleDestroy?.(this);for(const e of i.plugins)e.particleDestroyed?.(this,t);for(const e of i.particles.updaters)e.particleDestroyed?.(this,t);e?.reset(this),this._engine.dispatchEvent(p.B.particleDestroyed,{container:this.container,data:{particle:this}})}draw(t){const i=this.container,e=i.canvas;for(const s of i.plugins)e.drawParticlePlugin(s,this,t);e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:n.tA)}getFillColor(){return this._getRollColor(this.bubble.color??(0,o.O_)(this.color))}getMass(){return this.getRadius()**n.dm*Math.PI*n.MX}getOpacity(){const t=this.options.zIndex,i=(n.RV-this.zIndexFactor)**t.opacityRate,e=this.bubble.opacity??(0,s.VG)(this.opacity?.value??n.hv),a=this.strokeOpacity??e;return this._cachedOpacityData.opacity=e*i,this._cachedOpacityData.strokeOpacity=a*i,this._cachedOpacityData}getPosition(){return this._cachedPosition.x=this.position.x+this.offset.x,this._cachedPosition.y=this.position.y+this.offset.y,this._cachedPosition.z=this.position.z,this._cachedPosition}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this._cachedRotateData.sin=Math.sin(t),this._cachedRotateData.cos=Math.cos(t),this._cachedRotateData}getStrokeColor(){return this._getRollColor(this.bubble.color??(0,o.O_)(this.strokeColor))}getTransformData(t){const i=this.getRotateData(),e=this.isRotating;return this._cachedTransform.a=i.cos*(t.a??n.Ug.a),this._cachedTransform.b=e?i.sin*(t.b??n.D_):t.b??n.Ug.b,this._cachedTransform.c=e?-i.sin*(t.c??n.D_):t.c??n.Ug.c,this._cachedTransform.d=i.cos*(t.d??n.Ug.d),this._cachedTransform}init(t,i,e,a){const o=this.container;this.id=t,this.group=a,this.effectClose=!0,this.effectFill=!0,this.shapeClose=!0,this.shapeFill=!0,this.pathRotation=!1,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.isRotating=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{}},this.outType=m.x.normal,this.ignoresResizeRatio=!0;const h=o.retina.pixelRatio,c=o.actualOptions,l=(0,v.y)(this._engine,o,c.particles),d=l.reduceDuplicates,p=l.effect.type,u=l.shape.type;this.effect=(0,r.TA)(p,this.id,d),this.shape=(0,r.TA)(u,this.id,d);const f=l.effect,_=l.shape;if(e){if(e.effect?.type){const t=e.effect.type,i=(0,r.TA)(t,this.id,d);i&&(this.effect=i,f.load(e.effect))}if(e.shape?.type){const t=e.shape.type,i=(0,r.TA)(t,this.id,d);i&&(this.shape=i,_.load(e.shape))}}if(this.effect===n.mR){const t=[...this.container.effectDrawers.keys()];this.effect=t[Math.floor((0,s.G0)()*t.length)]}if(this.shape===n.mR){const t=[...this.container.shapeDrawers.keys()];this.shape=t[Math.floor((0,s.G0)()*t.length)]}this.effectData=this.effect?function(t,i,e,s){const n=i.options[t];return(0,r.zw)({close:i.close,fill:i.fill},(0,r.TA)(n,e,s))}(this.effect,f,this.id,d):void 0,this.shapeData=this.shape?function(t,i,e,s){const n=i.options[t];return(0,r.zw)({close:i.close,fill:i.fill},(0,r.TA)(n,e,s))}(this.shape,_,this.id,d):void 0,l.load(e);const g=this.effectData;g&&l.load(g.particles);const y=this.shapeData;y&&l.load(y.particles),this.effectFill=g?.fill??l.effect.fill,this.effectClose=g?.close??l.effect.close,this.shapeFill=y?.fill??l.shape.fill,this.shapeClose=y?.close??l.shape.close,this.options=l;const w=this.options.move.path;this.pathDelay=(0,s.VG)(w.delay.value)*n.Xu,w.generator&&(this.pathGenerator=this._engine.getPathGenerator(w.generator),this.pathGenerator&&o.addPath(w.generator,this.pathGenerator)&&this.pathGenerator.init(o)),o.retina.initParticle(this),this.size=(0,r.Xs)(this.options.size,h),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this._initPosition(i),this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy(),this.moveDecay=n.WH-(0,s.VG)(this.options.move.decay);const b=o.particles;let z,P;b.setLastZIndex(this.position.z),this.zIndexFactor=this.position.z/o.zLayers,this.sides=24,this.effect&&(z=o.effectDrawers.get(this.effect),z||(z=this._engine.getEffectDrawer(this.effect),z&&o.effectDrawers.set(this.effect,z))),z?.loadEffect&&z.loadEffect(this),this.shape&&(P=o.shapeDrawers.get(this.shape),P||(P=this._engine.getShapeDrawer(this.shape),P&&o.shapeDrawers.set(this.shape,P))),P?.loadShape&&P.loadShape(this);const D=P?.getSidesCount;D&&(this.sides=D(this)),this.spawning=!1;for(const t of b.updaters)t.init(this);for(const t of b.movers)t.init(this);z?.particleInit?.(o,this),P?.particleInit?.(o,this);for(const t of o.plugins)t.particleCreated?.(this)}isInsideCanvas(){const t=this.getRadius(),i=this.container.canvas.size,e=this.position;return e.x>=-t&&e.y>=-t&&e.y<=i.height+t&&e.x<=i.width+t}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.container.particles.updaters)t.reset?.(this)}}var z=e(4564),P=e(4673);class D{constructor(t,i){this.rectangle=t,this.capacity=i,this._subdivide=()=>{const{x:t,y:i}=this.rectangle.position,{width:e,height:s}=this.rectangle.size,{capacity:a}=this;for(let r=0;r<n.Pg;r++){const o=r%n.gd;this._subs.push(new D(new P.M_(t+e*n.MX*o,i+s*n.MX*(Math.round(r*n.MX)-o),e*n.MX,s*n.MX),a))}this._divided=!0},this._points=[],this._divided=!1,this._subs=[]}insert(t){return!!this.rectangle.contains(t.position)&&(this._points.length<this.capacity?(this._points.push(t),!0):(this._divided||this._subdivide(),this._subs.some((i=>i.insert(t)))))}query(t,i){const e=[];if(!t.intersects(this.rectangle))return[];for(const n of this._points)!t.contains(n.position)&&(0,s.Yf)(t.position,n.position)>n.particle.getRadius()&&(!i||i(n.particle))||e.push(n.particle);if(this._divided)for(const s of this._subs)e.push(...s.query(t,i));return e}queryCircle(t,i,e){return this.query(new P.jl(t.x,t.y,i),e)}queryRectangle(t,i,e){return this.query(new P.M_(t.x,t.y,i.width,i.height),e)}}var x=e(4077);const O=t=>{const{height:i,width:e}=t;return new P.M_(n.un*e,n.un*i,n.Rh*e,n.Rh*i)};class S{constructor(t,i){this._addToPool=(...t)=>{this._pool.push(...t)},this._applyDensity=(t,i,e,s)=>{const a=t.number;if(!a.density.enable)return void(void 0===e?this._limit=a.limit.value:(s?.number.limit.value??a.limit.value)&&this._groupLimits.set(e,s?.number.limit.value??a.limit.value));const r=this._initDensityFactor(a.density),o=a.value,h=a.limit.value>n.ou?a.limit.value:o,c=Math.min(o,h)*r+i,l=Math.min(this.count,this.filter((t=>t.group===e)).length);void 0===e?this._limit=a.limit.value*r:this._groupLimits.set(e,a.limit.value*r),l<c?this.push(Math.abs(c-l),void 0,t,e):l>c&&this.removeQuantity(l-c,e)},this._initDensityFactor=t=>{const i=this._container;if(!i.canvas.element||!t.enable)return n.lA;const e=i.canvas.element,s=i.retina.pixelRatio;return e.width*e.height/(t.height*t.width*s**n.dm)},this._pushParticle=(t,i,e,s)=>{try{const n=this._pool.pop()??new b(this._engine,this._container);n.init(this._nextId,t,i,e);let a=!0;if(s&&(a=s(n)),!a)return;return this._array.push(n),this._zArray.push(n),this._nextId++,this._engine.dispatchEvent(p.B.particleAdded,{container:this._container,data:{particle:n}}),n}catch(t){(0,x.t)().warning(`error adding particle: ${t}`)}},this._removeParticle=(t,i,e)=>{const s=this._array[t];if(!s)return!1;if(s.group!==i)return!1;const a=this._zArray.indexOf(s);return this._array.splice(t,n.LD),this._zArray.splice(a,n.LD),s.destroy(e),this._engine.dispatchEvent(p.B.particleRemoved,{container:this._container,data:{particle:s}}),this._addToPool(s),!0},this._engine=t,this._container=i,this._nextId=0,this._array=[],this._zArray=[],this._pool=[],this._limit=0,this._groupLimits=new Map,this._needsSort=!1,this._lastZIndex=0,this._pluginsInitialized=!1;const e=i.canvas.size;this.quadTree=new D(O(e),n.Kw),this.movers=[],this.updaters=[]}get count(){return this._array.length}addParticle(t,i,e,s){const a=this._container.actualOptions.particles.number.limit.mode,r=void 0===e?this._limit:this._groupLimits.get(e)??this._limit,o=this.count;if(r>n.ou)switch(a){case f.d.delete:{const t=o+n.nq-r;t>n.wM&&this.removeQuantity(t);break}case f.d.wait:if(o>=r)return}return this._pushParticle(t,i,e,s)}clear(){this._array=[],this._zArray=[],this._pluginsInitialized=!1}destroy(){this._array=[],this._zArray=[],this.movers=[],this.updaters=[]}drawParticles(t){for(const i of this._zArray)i.draw(t)}filter(t){return this._array.filter(t)}find(t){return this._array.find(t)}get(t){return this._array[t]}async init(){const t=this._container,i=t.actualOptions;this._lastZIndex=0,this._needsSort=!1;for(const i of t.plugins)i.redrawInit&&await i.redrawInit();await this.initPlugins();let e=!1;for(const i of t.plugins)if(e=i.particlesInitialization?.()??e,e)break;if(!e){const t=i.particles,e=t.groups;for(const i in e){const s=e[i];if(s)for(let e=this.count,n=0;n<s.number.value&&e<t.number.value;e++,n++)this.addParticle(void 0,s,i)}for(let i=this.count;i<t.number.value;i++)this.addParticle()}}async initPlugins(){if(this._pluginsInitialized)return;const t=this._container;this.movers=await this._engine.getMovers(t,!0),this.updaters=await this._engine.getUpdaters(t,!0);for(const i of t.pathGenerators.values())i.init(t)}push(t,i,e,s){for(let n=0;n<t;n++)this.addParticle(i,e,s)}async redraw(){this.clear(),await this.init(),this._container.canvas.drawParticles({value:0,factor:0})}remove(t,i,e){this.removeAt(this._array.indexOf(t),void 0,i,e)}removeAt(t,i=n.xd,e,s){if(t<n.z9||t>this.count)return;let a=0;for(let n=t;a<i&&n<this.count;n++)this._removeParticle(n,e,s)&&(n--,a++)}removeQuantity(t,i){this.removeAt(n.z9,t,i)}setDensity(){const t=this._container.actualOptions,i=t.particles.groups;let e=0;for(const t of this._container.plugins)t.particlesDensityCount&&(e+=t.particlesDensityCount());for(const t in i){const s=i[t];if(!s)continue;const n=(0,v.y)(this._engine,this._container,s);this._applyDensity(n,e,t)}this._applyDensity(t.particles,e)}setLastZIndex(t){this._lastZIndex=t,this._needsSort=this._needsSort||this._lastZIndex<t}setResizeFactor(t){this._resizeFactor=t}update(t){const i=this._container,e=new Set;this.quadTree=new D(O(i.canvas.size),n.Kw);for(const t of i.pathGenerators.values())t.update();for(const e of i.plugins)e.update?.(t);const s=this._resizeFactor;for(const i of this._array){s&&!i.ignoresResizeRatio&&(i.position.x*=s.width,i.position.y*=s.height,i.initialPosition.x*=s.width,i.initialPosition.y*=s.height),i.ignoresResizeRatio=!1;for(const t of this._container.plugins)t.particleReset&&t.particleReset(i);for(const e of this._container.plugins){if(i.destroyed)break;e.particleUpdate?.(i,t)}for(const e of this.movers)e.isEnabled(i)&&e.move(i,t);i.destroyed?e.add(i):this.quadTree.insert(new z.b(i.getPosition(),i))}if(e.size){const t=t=>!e.has(t);this._array=this.filter(t),this._zArray=this._zArray.filter(t);for(const t of e)this._engine.dispatchEvent(p.B.particleRemoved,{container:this._container,data:{particle:t}});this._addToPool(...e)}for(const e of i.plugins)e.postUpdate&&e.postUpdate(t);for(const e of this._array){for(const i of this.updaters)i.update(e,t);if(!e.destroyed&&!e.spawning)for(const s of i.plugins)s.postParticleUpdate&&s.postParticleUpdate(e,t)}if(delete this._resizeFactor,this._needsSort){const t=this._zArray;t.sort(((t,i)=>i.position.z-t.position.z||t.id-i.id));const i=t[t.length-n.K3];if(!i)return;this._lastZIndex=i.position.z,this._needsSort=!1}}}class R{constructor(t){this.container=t,this.pixelRatio=n.$x,this.reduceFactor=n.Zp}init(){const t=this.container,i=t.actualOptions;this.pixelRatio=i.detectRetina?devicePixelRatio:n.$x,this.reduceFactor=n.Zp;const e=this.pixelRatio,a=t.canvas;if(a.element){const t=a.element;a.size.width=t.offsetWidth*e,a.size.height=t.offsetHeight*e}const r=i.particles,o=r.move;this.maxSpeed=(0,s.VG)(o.gravity.maxSpeed)*e,this.sizeAnimationSpeed=(0,s.VG)(r.size.animation.speed)*e}initParticle(t){const i=t.options,e=this.pixelRatio,n=i.move,a=n.distance,r=t.retina;r.moveDrift=(0,s.VG)(n.drift)*e,r.moveSpeed=(0,s.VG)(n.speed)*e,r.sizeAnimationSpeed=(0,s.VG)(i.size.animation.speed)*e;const o=r.maxDistance;o.horizontal=void 0!==a.horizontal?a.horizontal*e:void 0,o.vertical=void 0!==a.vertical?a.vertical*e:void 0,r.maxSpeed=(0,s.VG)(n.gravity.maxSpeed)*e}}function C(t){return!t.destroyed}function T(t,i,...e){const s=new u.J(t,i);return(0,v.Z)(s,...e),s}class M{constructor(t,i,e){this._delta={value:0,factor:0},this._nextFrame=t=>{try{if(!this._smooth&&void 0!==this._lastFrameTime&&t<this._lastFrameTime+n.Xu/this.fpsLimit)return void this.draw(!1);if(this._lastFrameTime??=t,function(t,i,e=n.z$,s=!1){t.value=i,t.factor=s?n.z$/e:n.z$*i/n.Xu}(this._delta,t-this._lastFrameTime,this.fpsLimit,this._smooth),this.addLifeTime(this._delta.value),this._lastFrameTime=t,this._delta.value>n.Xu)return void this.draw(!1);if(this.canvas.drawParticles(this._delta),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){(0,x.t)().error("error in animation loop",t)}},this._engine=t,this.id=Symbol(i),this.fpsLimit=120,this.hdr=!1,this._smooth=!1,this._delay=0,this._duration=0,this._lifeTime=0,this._firstStart=!0,this.started=!1,this.destroyed=!1,this._paused=!0,this._lastFrameTime=0,this.zLayers=100,this.pageHidden=!1,this._sourceOptions=e,this._initialSourceOptions=e,this.retina=new R(this),this.canvas=new l(this,this._engine),this.particles=new S(this._engine,this),this.pathGenerators=new Map,this.plugins=[],this.effectDrawers=new Map,this.shapeDrawers=new Map,this._options=T(this._engine,this),this.actualOptions=T(this._engine,this),this._eventListeners=new d(this),this._engine.dispatchEvent(p.B.containerBuilt,{container:this})}get animationStatus(){return!this._paused&&!this.pageHidden&&C(this)}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addLifeTime(t){this._lifeTime+=t}addPath(t,i,e=!1){return!(!C(this)||!e&&this.pathGenerators.has(t))&&(this.pathGenerators.set(t,i),!0)}alive(){return!this._duration||this._lifeTime<=this._duration}destroy(t=!0){if(C(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const t of this.effectDrawers.values())t.destroy?.(this);this.effectDrawers.clear();for(const t of this.shapeDrawers.values())t.destroy?.(this);this.shapeDrawers.clear();for(const t of this.plugins)t.destroy?.();if(this.plugins.length=0,this._engine.clearPlugins(this),this.destroyed=!0,t){const t=this._engine.items,i=t.indexOf(this);i>=n.vF&&t.splice(i,n.JC)}this._engine.dispatchEvent(p.B.containerDestroyed,{container:this})}}draw(t){if(!C(this))return;let i=t;const e=t=>{i&&(this._lastFrameTime=void 0,i=!1),this._nextFrame(t)};this._drawAnimationFrame=(0,s.i0)((t=>{e(t)}))}async export(t,i={}){for(const e of this.plugins){if(!e.export)continue;const s=await e.export(t,i);if(s.supported)return s.blob}(0,x.t)().error(`Export plugin with type ${t} not found`)}async init(){if(!C(this))return;const t=this._engine.getSupportedEffects();for(const i of t){const t=this._engine.getEffectDrawer(i);t&&this.effectDrawers.set(i,t)}const i=this._engine.getSupportedShapes();for(const t of i){const i=this._engine.getShapeDrawer(t);i&&this.shapeDrawers.set(t,i)}const e=new Map;for(const t of this._engine.plugins){const i=await t.getPlugin(this);i.preInit&&await i.preInit(),e.set(t,i)}await this.particles.initPlugins(),this._options=T(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=T(this._engine,this,this._options);for(const[t,i]of e)t.needsPlugin(this.actualOptions)&&this.plugins.push(i);this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:a,duration:r,fpsLimit:o,hdr:h,smooth:c,zLayers:l}=this.actualOptions;this.hdr=h,this.zLayers=l,this._duration=(0,s.VG)(r)*n.Xu,this._delay=(0,s.VG)(a)*n.Xu,this._lifeTime=0,this.fpsLimit=o>n.DN?o:n.i8,this._smooth=c;for(const t of this.plugins)await(t.init?.());for(const t of this.effectDrawers.values())await(t.init?.(this));for(const t of this.shapeDrawers.values())await(t.init?.(this));this._engine.dispatchEvent(p.B.containerInit,{container:this}),await this.particles.init(),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this._engine.dispatchEvent(p.B.particlesSetup,{container:this})}pause(){if(C(this)&&(void 0!==this._drawAnimationFrame&&((0,s.px)(this._drawAnimationFrame),delete this._drawAnimationFrame),!this._paused)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this._paused=!0),this._engine.dispatchEvent(p.B.containerPaused,{container:this})}}play(t){if(!C(this))return;const i=this._paused||t;if(!this._firstStart||this.actualOptions.autoPlay){if(this._paused&&(this._paused=!1),i)for(const t of this.plugins)t.play&&t.play();this._engine.dispatchEvent(p.B.containerPlay,{container:this}),this.draw(i??!1)}else this._firstStart=!1}async refresh(){if(C(this))return this.stop(),this.start()}async reset(t){if(C(this))return this._initialSourceOptions=t,this._sourceOptions=t,this._options=T(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=T(this._engine,this,this._options),this.refresh()}async start(){C(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise((t=>{const i=async()=>{this._eventListeners.addListeners();for(const t of this.plugins)await(t.start?.());this._engine.dispatchEvent(p.B.containerStarted,{container:this}),this.play(),t()};this._delayTimeout=setTimeout((()=>{i()}),this._delay)})))}stop(){if(C(this)&&this.started){this._delayTimeout&&(clearTimeout(this._delayTimeout),delete this._delayTimeout),this._firstStart=!0,this.started=!1,this._eventListeners.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop();for(const t of this.plugins)t.stop?.();this.plugins.length=0,this._sourceOptions=this._options,this._engine.dispatchEvent(p.B.containerStopped,{container:this})}}updateActualOptions(){let t=!1;for(const i of this.plugins)i.updateActualOptions&&(t=i.updateActualOptions()||t);return t}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Particles.js v4.0.0-alpha.4 by Matteo Bruni */
|
package/256.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 256.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_pjs=this.webpackChunk_tsparticles_pjs||[]).push([[256],{3148(t,i,e){e.d(i,{k:()=>l});var n=e(7724);class s{constructor(){this.enable=!1,this.mode=[]}load(t){(0,n.kZJ)(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode))}}var o=e(9573);class a{constructor(){this.enable=!1,this.mode=[]}load(t){(0,n.kZJ)(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode))}}class c{constructor(){this.onClick=new s,this.onDiv=new o.G,this.onHover=new a}load(t){if((0,n.kZJ)(t))return;this.onClick.load(t.onClick);const i=t.onDiv;void 0!==i&&(this.onDiv=(0,n.wJ2)(i,(t=>{const i=new o.G;return i.load(t),i}))),this.onHover.load(t.onHover)}}var r=e(1124),d=e(6245);class l{constructor(t,i){this.detectsOn=r.h.window,this.events=new c,this.modes=new d.d(t,i)}load(t){if((0,n.kZJ)(t))return;const i=t.detectsOn;void 0!==i&&(this.detectsOn=i),this.events.load(t.events),this.modes.load(t.modes)}}},7256(t,i,e){e.d(i,{InteractivityPlugin:()=>o});var n=e(7724),s=e(3148);class o{constructor(t){this._engine=t,this.id="interactivity"}async getPlugin(t){const{InteractivityPluginInstance:i}=await e.e(380).then(e.bind(e,3380));return new i(this._engine,t)}loadOptions(t,i,e){if(!this.needsPlugin())return;let n=i.interactivity;n?.load||(i.interactivity=n=new s.k(this._engine,t)),n.load(e?.interactivity);const o=this._engine.interactors?.get(t);if(o)for(const t of o)t.loadOptions&&t.loadOptions(i,e)}loadParticlesOptions(t,i,e){e?.interactivity&&(i.interactivity=(0,n.zwS)({},e.interactivity));const s=this._engine.interactors?.get(t);if(s)for(const t of s)t.loadParticlesOptions&&t.loadParticlesOptions(i,e)}needsPlugin(){return!0}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Particles.js v4.0.0-alpha.4 by Matteo Bruni */
|
package/380.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 380.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_pjs=this.webpackChunk_tsparticles_pjs||[]).push([[380],{3380(t,e,i){i.d(e,{InteractivityPluginInstance:()=>p});var n=i(7724);const s="pointerleave",a="pointermove",o="touchstart",r="touchend",c="touchmove",h="touchcancel";var l=i(1124);class d{constructor(t,e){this._canPush=!0,this._doMouseTouchClick=t=>{const e=this._container,i=this._interactionManager,s=e.actualOptions;if(this._canPush){const t=i.interactivityData.mouse,e=t.position;if(!e)return;t.clickPosition={...e},t.clickTime=Date.now();const a=s.interactivity?.events.onClick;if(!a?.mode)return;(0,n.wJ2)(a.mode,(t=>{i.handleClickMode(t)}))}"touchend"===t.type&&setTimeout((()=>{this._mouseTouchFinish()}),n.pHD)},this._handleVisibilityChange=()=>{this._mouseTouchFinish()},this._manageInteractivityListeners=(t,e)=>{const i=this._handlers,s=this._container,l=this._interactionManager,d=s.actualOptions,u=l.interactivityData.element;if(!u)return;const _=u,v=s.canvas;v.setPointerEvents(_===v.element?"initial":"none"),(d.interactivity?.events.onHover.enable||d.interactivity?.events.onClick.enable)&&((0,n.KpY)(u,a,i.mouseMove,e),(0,n.KpY)(u,o,i.touchStart,e),(0,n.KpY)(u,c,i.touchMove,e),d.interactivity.events.onClick.enable?((0,n.KpY)(u,r,i.touchEndClick,e),(0,n.KpY)(u,"pointerup",i.mouseUp,e),(0,n.KpY)(u,"pointerdown",i.mouseDown,e)):(0,n.KpY)(u,r,i.touchEnd,e),(0,n.KpY)(u,t,i.mouseLeave,e),(0,n.KpY)(u,h,i.touchCancel,e))},this._manageListeners=t=>{const e=this._handlers,i=this._container,a=this._interactionManager,o=i.actualOptions,r=o.interactivity?.detectsOn,c=i.canvas.element;let h=s;r===l.h.window?(a.interactivityData.element=globalThis,h="pointerout"):r===l.h.parent&&c?a.interactivityData.element=c.parentElement??c.parentNode:a.interactivityData.element=c,this._manageInteractivityListeners(h,t),(0,n.KpY)(document,n.nKi,e.visibilityChange,t,!1)},this._mouseDown=()=>{const{interactivityData:t}=this._interactionManager,{mouse:e}=t;e.clicking=!0,e.downPosition=e.position},this._mouseTouchClick=t=>{const e=this._container,i=this._interactionManager,n=e.actualOptions,{mouse:s}=i.interactivityData;s.inside=!0;let a=!1;const o=s.position;if(o&&n.interactivity?.events.onClick.enable){for(const t of e.plugins)if(t.clickPositionValid&&(a=t.clickPositionValid(o),a))break;a||this._doMouseTouchClick(t),s.clicking=!1}},this._mouseTouchFinish=()=>{const{interactivityData:t}=this._interactionManager,{mouse:e}=t;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=s,e.inside=!1,e.clicking=!1},this._mouseTouchMove=t=>{const e=this._container,i=this._interactionManager,s=e.actualOptions,o=i.interactivityData,r=e.canvas.element;if(!o.element)return;let c;if(o.mouse.inside=!0,t.type.startsWith("pointer")){this._canPush=!0;const e=t;if(o.element===globalThis){if(r){const t=r.getBoundingClientRect();c={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(s.interactivity?.detectsOn===l.h.parent){const t=e.target,i=e.currentTarget;if(r){const s=t.getBoundingClientRect(),a=i.getBoundingClientRect(),o=r.getBoundingClientRect();c={x:e.offsetX+n.gdl*s.left-(a.left+o.left),y:e.offsetY+n.gdl*s.top-(a.top+o.top)}}else c={x:e.offsetX,y:e.offsetY}}else e.target===r&&(c={x:e.offsetX,y:e.offsetY})}else if(this._canPush="touchmove"!==t.type,r){const e=t,i=e.touches[e.touches.length-n.K3],s=r.getBoundingClientRect();if(!i)return;c={x:i.clientX-s.left,y:i.clientY-s.top}}const h=e.retina.pixelRatio;c&&(c.x*=h,c.y*=h),o.mouse.position=c,o.status=a},this._touchEnd=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.delete(t.identifier);this._mouseTouchFinish()},this._touchEndClick=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.delete(t.identifier);this._mouseTouchClick(t)},this._touchStart=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.set(t.identifier,performance.now());this._mouseTouchMove(t)},this._container=t,this._interactionManager=e,this._touches=new Map,this._handlers={mouseDown:()=>{this._mouseDown()},mouseLeave:()=>{this._mouseTouchFinish()},mouseMove:t=>{this._mouseTouchMove(t)},mouseUp:t=>{this._mouseTouchClick(t)},touchStart:t=>{this._touchStart(t)},touchMove:t=>{this._mouseTouchMove(t)},touchEnd:t=>{this._touchEnd(t)},touchCancel:t=>{this._touchEnd(t)},touchEndClick:t=>{this._touchEndClick(t)},visibilityChange:()=>{this._handleVisibilityChange()}}}addListeners(){this._manageListeners(!0)}removeListeners(){this._manageListeners(!1)}}var u=i(409);class _{constructor(t,e){this.container=e,this._intersectionManager=t=>{const{container:e}=this;if(!e.destroyed&&e.actualOptions.pauseOnOutsideViewport)for(const i of t)i.target===this.interactivityData.element&&(i.isIntersecting?e.play():e.pause())},this._engine=t,this._interactors=[],this._externalInteractors=[],this._particleInteractors=[],this._clickHandlers=new Map,this._eventListeners=new d(e,this),this.interactivityData={mouse:{clicking:!1,inside:!1}},this._intersectionObserver=(0,n.BRq)((t=>{this._intersectionManager(t)}))}addClickHandler(t){const{container:e,interactivityData:i}=this;if(e.destroyed)return;const s=i.element;if(!s)return;const a=(i,n,s)=>{if(e.destroyed)return;const a=e.retina.pixelRatio,o={x:n.x*a,y:n.y*a},r=e.particles.quadTree.queryCircle(o,s*a);t(i,r)};let l=!1,d=!1;this._clickHandlers.set("click",(t=>{if(e.destroyed)return;const i=t,s={x:i.offsetX,y:i.offsetY};a(t,s,n.FSi)})),this._clickHandlers.set(o,(()=>{e.destroyed||(l=!0,d=!1)})),this._clickHandlers.set(c,(()=>{e.destroyed||(d=!0)})),this._clickHandlers.set(r,(t=>{if(!e.destroyed){if(l&&!d){const i=t,s=i.touches[i.touches.length-n.KZx];if(!s)return;const o=e.canvas.element,r=o?o.getBoundingClientRect():void 0,c={x:s.clientX-(r?r.left:n.TLE),y:s.clientY-(r?r.top:n.TLE)};a(t,c,Math.max(s.radiusX,s.radiusY))}l=!1,d=!1}})),this._clickHandlers.set(h,(()=>{e.destroyed||(l=!1,d=!1)}));for(const[t,e]of this._clickHandlers)s.addEventListener(t,e)}addListeners(){this._eventListeners.addListeners()}clearClickHandlers(){const{container:t,interactivityData:e}=this;if(!t.destroyed){for(const[t,i]of this._clickHandlers)e.element?.removeEventListener(t,i);this._clickHandlers.clear()}}externalInteract(t){for(const e of this._externalInteractors){const{interactivityData:i}=this;e.isEnabled(i)&&e.interact(i,t)}}handleClickMode(t){if(this.container.destroyed)return;const{interactivityData:e}=this;for(const i of this._externalInteractors)i.handleClickMode?.(t,e)}async init(){const t=await(this._engine.getInteractors?.(this.container,!0));if(t){this._interactors=t,this._externalInteractors=[],this._particleInteractors=[];for(const t of this._interactors){switch(t.type){case u.e.external:this._externalInteractors.push(t);break;case u.e.particles:this._particleInteractors.push(t)}t.init()}}}particlesInteract(t,e){const{interactivityData:i}=this;for(const i of this._externalInteractors)i.clear(t,e);for(const n of this._particleInteractors)n.isEnabled(t,i)&&n.interact(t,i,e)}removeListeners(){this._eventListeners.removeListeners()}reset(t){const{interactivityData:e}=this;for(const i of this._externalInteractors)i.isEnabled(e)&&i.reset(e,t);for(const i of this._particleInteractors)i.isEnabled(t,e)&&i.reset(e,t)}startObserving(){const{interactivityData:t}=this;t.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.observe(t.element)}stopObserving(){const{interactivityData:t}=this;t.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.unobserve(t.element)}}var v=i(3148);class p{constructor(t,e){this._container=e,this._engine=t,this.interactionManager=new _(t,e),this._container.addClickHandler=t=>{this.interactionManager.addClickHandler(t)}}addClickHandler(t){this.interactionManager.addClickHandler(t)}clearClickHandlers(){this.interactionManager.clearClickHandlers()}destroy(){this.clearClickHandlers(),this._engine.interactors?.delete(this._container)}particleCreated(t){const e=t,i=new v.k(this._engine,this._container);i.load(this._container.actualOptions.interactivity),i.load(e.options.interactivity),e.interactivity=i}particleReset(t){this.interactionManager.reset(t)}postParticleUpdate(t,e){this.interactionManager.particlesInteract(t,e)}postUpdate(t){this.interactionManager.externalInteract(t)}async preInit(){await this.interactionManager.init()}async redrawInit(){await this.interactionManager.init()}start(){return this.interactionManager.addListeners(),this.interactionManager.startObserving(),Promise.resolve()}stop(){this.interactionManager.removeListeners(),this.interactionManager.stopObserving()}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Particles.js v4.0.0-alpha.4 by Matteo Bruni */
|
package/551.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 551.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_pjs=this.webpackChunk_tsparticles_pjs||[]).push([[551],{8551(s,t,i){i.d(t,{ResponsivePluginInstance:()=>n});class n{constructor(s){this._container=s}updateActualOptions(){const s=this._container;s.actualOptions.responsive=[];const t=s.actualOptions.setResponsive?.(s.canvas.size.width,s.retina.pixelRatio,s.options);return s.responsiveMaxWidth!==t&&(s.responsiveMaxWidth=t,!0)}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Particles.js v4.0.0-alpha.4 by Matteo Bruni */
|
package/785.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 785.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_pjs=this.webpackChunk_tsparticles_pjs||[]).push([[785],{785(s,e,n){function i(s){s.checkVersion("4.0.0-alpha.4"),s.register((async s=>{const{ResponsivePlugin:e}=await n.e(997).then(n.bind(n,3997));s.addPlugin(new e)}))}n.d(e,{loadResponsivePlugin:()=>i})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Particles.js v4.0.0-alpha.4 by Matteo Bruni */
|
package/824.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 824.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_pjs=this.webpackChunk_tsparticles_pjs||[]).push([[824],{409(t,e,n){var i;n.d(e,{e:()=>i}),function(t){t.external="external",t.particles="particles"}(i||(i={}))},1124(t,e,n){var i;n.d(e,{h:()=>i}),function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(i||(i={}))},6245(t,e,n){n.d(e,{d:()=>a});var i=n(7724);class a{constructor(t,e){this._engine=t,this._container=e}load(t){if((0,i.kZJ)(t))return;if(!this._container)return;const e=this._engine.interactors?.get(this._container);if(e)for(const n of e)n.loadModeOptions&&n.loadModeOptions(this,t)}}},6824(t,e,n){n.d(e,{loadInteractivityPlugin:()=>a});var i=n(7724);n(7703),n(409);n(1124);n(9573),n(6245);function a(t){t.checkVersion("4.0.0-alpha.4"),t.register((async t=>{const e=t,{InteractivityPlugin:a}=await n.e(256).then(n.bind(n,7256));e.addPlugin(new a(e)),e.interactorsInitializers??=new Map,e.interactors??=new Map,e.addInteractor=(t,n)=>{e.interactorsInitializers??=new Map,e.interactorsInitializers.set(t,n)},e.getInteractors=async(t,n=!1)=>(e.interactors??=new Map,e.interactorsInitializers??=new Map,(0,i.HQK)(t,e.interactors,e.interactorsInitializers,n)),e.setOnClickHandler=t=>{const{items:n}=e;if(!n.length)throw new Error("Click handlers can only be set after calling tsParticles.load()");n.forEach((e=>{const n=e;n.addClickHandler?.(t)}))}}))}},7703(t,e,n){var i;n.d(e,{Q:()=>i}),function(t){t.circle="circle",t.rectangle="rectangle"}(i||(i={}))},9573(t,e,n){n.d(e,{G:()=>r});var i=n(7724),a=n(7703);class r{constructor(){this.selectors=[],this.enable=!1,this.mode=[],this.type=a.Q.circle}load(t){(0,i.kZJ)(t)||(void 0!==t.selectors&&(this.selectors=t.selectors),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.type&&(this.type=t.type))}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Particles.js v4.0.0-alpha.4 by Matteo Bruni */
|
package/997.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 997.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_pjs=this.webpackChunk_tsparticles_pjs||[]).push([[997],{3997(s,e,n){n.d(e,{ResponsivePlugin:()=>a});var i,t=n(7724);!function(s){s.screen="screen",s.canvas="canvas"}(i||(i={}));class o{constructor(){this.maxWidth=1/0,this.options={},this.mode=i.canvas}load(s){(0,t.kZJ)(s)||((0,t.kZJ)(s.maxWidth)||(this.maxWidth=s.maxWidth),(0,t.kZJ)(s.mode)||(s.mode===i.screen?this.mode=i.screen:this.mode=i.canvas),(0,t.kZJ)(s.options)||(this.options=(0,t.zwS)({},s.options)))}}class a{constructor(){this.id="responsive"}async getPlugin(s){const{ResponsivePluginInstance:e}=await n.e(551).then(n.bind(n,8551));return new e(s)}loadOptions(s,e,n){if(!this.needsPlugin(e)&&!this.needsPlugin(n))return;if(e.setResponsive=(s,n,t)=>{e.load(t);const o=e.responsive?.find((e=>e.mode===i.screen?e.maxWidth>screen.availWidth:e.maxWidth*n>s));return e.load(o?.options),o?.maxWidth},e.responsive??=[],void 0!==n?.responsive)for(const s of n.responsive){const n=new o;s&&n.load(s),e.responsive.push(n)}e.responsive.sort(((s,e)=>s.maxWidth-e.maxWidth))}needsPlugin(s){return!!s?.responsive?.length}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Particles.js v4.0.0-alpha.4 by Matteo Bruni */
|
|
@@ -131,9 +131,6 @@ const initParticlesJS = (engine) => {
|
|
|
131
131
|
enable: fixedOptions.interactivity.events.onclick.enable,
|
|
132
132
|
mode: fixedOptions.interactivity.events.onclick.mode,
|
|
133
133
|
},
|
|
134
|
-
resize: {
|
|
135
|
-
enable: fixedOptions.interactivity.events.resize,
|
|
136
|
-
},
|
|
137
134
|
},
|
|
138
135
|
modes: {
|
|
139
136
|
grab: {
|
|
@@ -247,6 +244,9 @@ const initParticlesJS = (engine) => {
|
|
|
247
244
|
},
|
|
248
245
|
},
|
|
249
246
|
},
|
|
247
|
+
resize: {
|
|
248
|
+
enable: fixedOptions.interactivity.events.resize,
|
|
249
|
+
},
|
|
250
250
|
},
|
|
251
251
|
});
|
|
252
252
|
};
|
|
@@ -263,9 +263,9 @@ const initParticlesJS = (engine) => {
|
|
|
263
263
|
});
|
|
264
264
|
};
|
|
265
265
|
particlesJS.setOnClickHandler = (callback) => {
|
|
266
|
-
engine.setOnClickHandler(callback);
|
|
266
|
+
engine.setOnClickHandler?.(callback);
|
|
267
267
|
};
|
|
268
|
-
const pJSDom = engine.
|
|
268
|
+
const pJSDom = engine.items;
|
|
269
269
|
return { particlesJS, pJSDom };
|
|
270
270
|
};
|
|
271
271
|
export { initParticlesJS };
|
package/browser/index.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { MBParticles } from "./marcbruederlin/Particles.js";
|
|
2
2
|
import { initParticlesJS } from "./VincentGarreau/particles.js";
|
|
3
3
|
const initPjs = (engine) => {
|
|
4
|
-
engine.checkVersion("4.0.0-alpha.
|
|
4
|
+
engine.checkVersion("4.0.0-alpha.4");
|
|
5
|
+
engine.register(async (e) => {
|
|
6
|
+
const { loadInteractivityPlugin } = await import("@tsparticles/plugin-interactivity"), { loadResponsivePlugin } = await import("@tsparticles/plugin-responsive");
|
|
7
|
+
loadInteractivityPlugin(e);
|
|
8
|
+
loadResponsivePlugin(e);
|
|
9
|
+
});
|
|
5
10
|
const { particlesJS, pJSDom } = initParticlesJS(engine);
|
|
6
11
|
globalThis.particlesJS = particlesJS;
|
|
7
12
|
globalThis.pJSDom = pJSDom;
|
|
@@ -131,9 +131,6 @@ const initParticlesJS = (engine) => {
|
|
|
131
131
|
enable: fixedOptions.interactivity.events.onclick.enable,
|
|
132
132
|
mode: fixedOptions.interactivity.events.onclick.mode,
|
|
133
133
|
},
|
|
134
|
-
resize: {
|
|
135
|
-
enable: fixedOptions.interactivity.events.resize,
|
|
136
|
-
},
|
|
137
134
|
},
|
|
138
135
|
modes: {
|
|
139
136
|
grab: {
|
|
@@ -247,6 +244,9 @@ const initParticlesJS = (engine) => {
|
|
|
247
244
|
},
|
|
248
245
|
},
|
|
249
246
|
},
|
|
247
|
+
resize: {
|
|
248
|
+
enable: fixedOptions.interactivity.events.resize,
|
|
249
|
+
},
|
|
250
250
|
},
|
|
251
251
|
});
|
|
252
252
|
};
|
|
@@ -263,9 +263,9 @@ const initParticlesJS = (engine) => {
|
|
|
263
263
|
});
|
|
264
264
|
};
|
|
265
265
|
particlesJS.setOnClickHandler = (callback) => {
|
|
266
|
-
engine.setOnClickHandler(callback);
|
|
266
|
+
engine.setOnClickHandler?.(callback);
|
|
267
267
|
};
|
|
268
|
-
const pJSDom = engine.
|
|
268
|
+
const pJSDom = engine.items;
|
|
269
269
|
return { particlesJS, pJSDom };
|
|
270
270
|
};
|
|
271
271
|
export { initParticlesJS };
|
package/cjs/index.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { MBParticles } from "./marcbruederlin/Particles.js";
|
|
2
2
|
import { initParticlesJS } from "./VincentGarreau/particles.js";
|
|
3
3
|
const initPjs = (engine) => {
|
|
4
|
-
engine.checkVersion("4.0.0-alpha.
|
|
4
|
+
engine.checkVersion("4.0.0-alpha.4");
|
|
5
|
+
engine.register(async (e) => {
|
|
6
|
+
const { loadInteractivityPlugin } = await import("@tsparticles/plugin-interactivity"), { loadResponsivePlugin } = await import("@tsparticles/plugin-responsive");
|
|
7
|
+
loadInteractivityPlugin(e);
|
|
8
|
+
loadResponsivePlugin(e);
|
|
9
|
+
});
|
|
5
10
|
const { particlesJS, pJSDom } = initParticlesJS(engine);
|
|
6
11
|
globalThis.particlesJS = particlesJS;
|
|
7
12
|
globalThis.pJSDom = pJSDom;
|