"use strict";(globalThis.webpackChunk_tsparticles_wordpress=globalThis.webpackChunk_tsparticles_wordpress||[]).push([[2277],{2277:(t,e,a)=>{a.d(e,{loadParticlesAttractInteraction:()=>o});var s=a(9201);class i extends s.$S{constructor(t){super(t)}clear(){}init(){}async interact(t){const e=this.container;void 0===t.attractDistance&&(t.attractDistance=(0,s.Gu)(t.options.move.attract.distance)*e.retina.pixelRatio);const a=t.attractDistance,i=t.getPosition(),o=e.particles.quadTree.queryCircle(i,a);for(const e of o){if(t===e||!e.options.move.attract.enable||e.destroyed||e.spawning)continue;const a=e.getPosition(),{dx:o,dy:c}=(0,s.oW)(i,a),n=t.options.move.attract.rotate,r=o/(1e3*n.x),l=c/(1e3*n.y),p=e.size.value/t.size.value,d=1/p;t.velocity.x-=r*p,t.velocity.y-=l*p,e.velocity.x+=r*d,e.velocity.y+=l*d}}isEnabled(t){return t.options.move.attract.enable}reset(){}}async function o(t,e=!0){await t.addInteractor("particlesAttract",(t=>new i(t)),e)}}}]);