"use strict";(globalThis.webpackChunkwordpress_particles=globalThis.webpackChunkwordpress_particles||[]).push([[5240],{5240:(e,t,s)=>{s.r(t),s.d(t,{loadPolygonPath:()=>n,polygonPathName:()=>h});var i=s(1197);class o{constructor(){this.dirsList=[],this.options={sides:6,turnSteps:20,angle:30}}generate(e){return void 0===e.hexStep&&(e.hexStep=0),void 0===e.hexDirection&&(e.hexDirection=6===this.options.sides?2*(3*(0,i.sZ)()|0):(0,i.sZ)()*this.options.sides|0),void 0===e.hexSpeed&&(e.hexSpeed=e.velocity.length),e.hexStep%this.options.turnSteps==0&&(e.hexDirection=(0,i.sZ)()>.5?(e.hexDirection+1)%this.options.sides:(e.hexDirection+this.options.sides-1)%this.options.sides),e.velocity.x=0,e.velocity.y=0,e.hexStep++,i.OW.create(this.dirsList[e.hexDirection].x*e.hexSpeed,this.dirsList[e.hexDirection].y*e.hexSpeed)}init(e){var t;const s=e.actualOptions.particles.move.path.options;this.options.sides=s.sides>0?s.sides:6,this.options.angle=null!==(t=s.angle)&&void 0!==t?t:30,this.options.turnSteps=s.turnSteps>=0?s.turnSteps:20,this.createDirs()}reset(e){delete e.hexStep,delete e.hexDirection,delete e.hexSpeed}update(){}createDirs(){this.dirsList=[];for(let e=0;e<360;e+=360/this.options.sides){const t=this.options.angle+e;this.dirsList.push(i.OW.create(Math.cos(t*Math.PI/180),Math.sin(t*Math.PI/180)))}}}const h="polygonPathGenerator";function n(e){e.addPathGenerator(h,new o)}}}]);