"use strict";(globalThis.webpackChunk_tsparticles_wordpress=globalThis.webpackChunk_tsparticles_wordpress||[]).push([[8551],{8551:(t,e,n)=>{n.d(e,{loadPolygonShape:()=>i});var a=n(9201);class r{draw(t){const{context:e,particle:n,radius:a}=t,r=this.getCenter(n,a),s=this.getSidesData(n,a),o=s.count.numerator*s.count.denominator,i=s.count.numerator/s.count.denominator,u=180*(i-2)/i,c=Math.PI-Math.PI*u/180;if(e){e.beginPath(),e.translate(r.x,r.y),e.moveTo(0,0);for(let t=0;t<o;t++)e.lineTo(s.length,0),e.translate(s.length,0),e.rotate(c)}}getSidesCount(t){const e=t.shapeData;return Math.round((0,a.Gu)(e?.sides??5))}}class s extends r{getCenter(t,e){return{x:-e/(t.sides/3.5),y:-e/.76}}getSidesData(t,e){const n=t.sides;return{count:{denominator:1,numerator:n},length:2.66*e/(n/3)}}}class o extends r{getCenter(t,e){return{x:-e,y:e/1.66}}getSidesCount(){return 3}getSidesData(t,e){return{count:{denominator:2,numerator:3},length:2*e}}}async function i(t,e=!0){await async function(t,e=!0){await t.addShape("polygon",new s,e)}(t,e),await async function(t,e=!0){await t.addShape("triangle",new o,e)}(t,e)}}}]);