@tsparticles/shape-polygon 4.0.1 → 4.0.3

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/browser/index.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import { PolygonDrawer } from "./PolygonDrawer.js";
2
2
  import { TriangleDrawer } from "./TriangleDrawer.js";
3
3
  export async function loadGenericPolygonShape(engine) {
4
- engine.checkVersion("4.0.1");
4
+ engine.checkVersion("4.0.3");
5
5
  await engine.pluginManager.register(e => {
6
6
  e.pluginManager.addShape(["polygon"], () => Promise.resolve(new PolygonDrawer()));
7
7
  });
8
8
  }
9
9
  export async function loadTriangleShape(engine) {
10
- engine.checkVersion("4.0.1");
10
+ engine.checkVersion("4.0.3");
11
11
  await engine.pluginManager.register(e => {
12
12
  e.pluginManager.addShape(["triangle"], () => Promise.resolve(new TriangleDrawer()));
13
13
  });
14
14
  }
15
15
  export async function loadPolygonShape(engine) {
16
- engine.checkVersion("4.0.1");
16
+ engine.checkVersion("4.0.3");
17
17
  await Promise.all([
18
18
  loadGenericPolygonShape(engine),
19
19
  loadTriangleShape(engine),
@@ -1,19 +1,19 @@
1
1
  export async function loadGenericPolygonShape(engine) {
2
- engine.checkVersion("4.0.1");
2
+ engine.checkVersion("4.0.3");
3
3
  await engine.pluginManager.register(async (e) => {
4
4
  const { PolygonDrawer } = await import("./PolygonDrawer.js");
5
5
  e.pluginManager.addShape(["polygon"], () => Promise.resolve(new PolygonDrawer()));
6
6
  });
7
7
  }
8
8
  export async function loadTriangleShape(engine) {
9
- engine.checkVersion("4.0.1");
9
+ engine.checkVersion("4.0.3");
10
10
  await engine.pluginManager.register(async (e) => {
11
11
  const { TriangleDrawer } = await import("./TriangleDrawer.js");
12
12
  e.pluginManager.addShape(["triangle"], () => Promise.resolve(new TriangleDrawer()));
13
13
  });
14
14
  }
15
15
  export async function loadPolygonShape(engine) {
16
- engine.checkVersion("4.0.1");
16
+ engine.checkVersion("4.0.3");
17
17
  await Promise.all([
18
18
  loadGenericPolygonShape(engine),
19
19
  loadTriangleShape(engine),
package/cjs/index.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import { PolygonDrawer } from "./PolygonDrawer.js";
2
2
  import { TriangleDrawer } from "./TriangleDrawer.js";
3
3
  export async function loadGenericPolygonShape(engine) {
4
- engine.checkVersion("4.0.1");
4
+ engine.checkVersion("4.0.3");
5
5
  await engine.pluginManager.register(e => {
6
6
  e.pluginManager.addShape(["polygon"], () => Promise.resolve(new PolygonDrawer()));
7
7
  });
8
8
  }
9
9
  export async function loadTriangleShape(engine) {
10
- engine.checkVersion("4.0.1");
10
+ engine.checkVersion("4.0.3");
11
11
  await engine.pluginManager.register(e => {
12
12
  e.pluginManager.addShape(["triangle"], () => Promise.resolve(new TriangleDrawer()));
13
13
  });
14
14
  }
15
15
  export async function loadPolygonShape(engine) {
16
- engine.checkVersion("4.0.1");
16
+ engine.checkVersion("4.0.3");
17
17
  await Promise.all([
18
18
  loadGenericPolygonShape(engine),
19
19
  loadTriangleShape(engine),
package/cjs/index.lazy.js CHANGED
@@ -1,19 +1,19 @@
1
1
  export async function loadGenericPolygonShape(engine) {
2
- engine.checkVersion("4.0.1");
2
+ engine.checkVersion("4.0.3");
3
3
  await engine.pluginManager.register(async (e) => {
4
4
  const { PolygonDrawer } = await import("./PolygonDrawer.js");
5
5
  e.pluginManager.addShape(["polygon"], () => Promise.resolve(new PolygonDrawer()));
6
6
  });
7
7
  }
8
8
  export async function loadTriangleShape(engine) {
9
- engine.checkVersion("4.0.1");
9
+ engine.checkVersion("4.0.3");
10
10
  await engine.pluginManager.register(async (e) => {
11
11
  const { TriangleDrawer } = await import("./TriangleDrawer.js");
12
12
  e.pluginManager.addShape(["triangle"], () => Promise.resolve(new TriangleDrawer()));
13
13
  });
14
14
  }
15
15
  export async function loadPolygonShape(engine) {
16
- engine.checkVersion("4.0.1");
16
+ engine.checkVersion("4.0.3");
17
17
  await Promise.all([
18
18
  loadGenericPolygonShape(engine),
19
19
  loadTriangleShape(engine),
package/esm/index.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import { PolygonDrawer } from "./PolygonDrawer.js";
2
2
  import { TriangleDrawer } from "./TriangleDrawer.js";
3
3
  export async function loadGenericPolygonShape(engine) {
4
- engine.checkVersion("4.0.1");
4
+ engine.checkVersion("4.0.3");
5
5
  await engine.pluginManager.register(e => {
6
6
  e.pluginManager.addShape(["polygon"], () => Promise.resolve(new PolygonDrawer()));
7
7
  });
8
8
  }
9
9
  export async function loadTriangleShape(engine) {
10
- engine.checkVersion("4.0.1");
10
+ engine.checkVersion("4.0.3");
11
11
  await engine.pluginManager.register(e => {
12
12
  e.pluginManager.addShape(["triangle"], () => Promise.resolve(new TriangleDrawer()));
13
13
  });
14
14
  }
15
15
  export async function loadPolygonShape(engine) {
16
- engine.checkVersion("4.0.1");
16
+ engine.checkVersion("4.0.3");
17
17
  await Promise.all([
18
18
  loadGenericPolygonShape(engine),
19
19
  loadTriangleShape(engine),
package/esm/index.lazy.js CHANGED
@@ -1,19 +1,19 @@
1
1
  export async function loadGenericPolygonShape(engine) {
2
- engine.checkVersion("4.0.1");
2
+ engine.checkVersion("4.0.3");
3
3
  await engine.pluginManager.register(async (e) => {
4
4
  const { PolygonDrawer } = await import("./PolygonDrawer.js");
5
5
  e.pluginManager.addShape(["polygon"], () => Promise.resolve(new PolygonDrawer()));
6
6
  });
7
7
  }
8
8
  export async function loadTriangleShape(engine) {
9
- engine.checkVersion("4.0.1");
9
+ engine.checkVersion("4.0.3");
10
10
  await engine.pluginManager.register(async (e) => {
11
11
  const { TriangleDrawer } = await import("./TriangleDrawer.js");
12
12
  e.pluginManager.addShape(["triangle"], () => Promise.resolve(new TriangleDrawer()));
13
13
  });
14
14
  }
15
15
  export async function loadPolygonShape(engine) {
16
- engine.checkVersion("4.0.1");
16
+ engine.checkVersion("4.0.3");
17
17
  await Promise.all([
18
18
  loadGenericPolygonShape(engine),
19
19
  loadTriangleShape(engine),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/shape-polygon",
3
- "version": "4.0.1",
3
+ "version": "4.0.3",
4
4
  "description": "tsParticles polygon shape",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -65,7 +65,7 @@
65
65
  "./package.json": "./package.json"
66
66
  },
67
67
  "peerDependencies": {
68
- "@tsparticles/engine": "4.0.1"
68
+ "@tsparticles/engine": "4.0.3"
69
69
  },
70
70
  "publishConfig": {
71
71
  "access": "public"
package/report.html CHANGED
@@ -4930,7 +4930,7 @@ var drawChart = (function (exports) {
4930
4930
  </script>
4931
4931
  <script>
4932
4932
  /*<!--*/
4933
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"tsparticles.shape.polygon.js","children":[{"name":"dist/browser","children":[{"uid":"5e72988a-1","name":"Utils.js"},{"uid":"5e72988a-3","name":"PolygonDrawerBase.js"},{"uid":"5e72988a-5","name":"PolygonDrawer.js"},{"uid":"5e72988a-7","name":"TriangleDrawer.js"},{"uid":"5e72988a-9","name":"index.js"},{"uid":"5e72988a-11","name":"browser.js"}]}]}],"isRoot":true},"nodeParts":{"5e72988a-1":{"renderedLength":1226,"gzipLength":0,"brotliLength":0,"metaUid":"5e72988a-0"},"5e72988a-3":{"renderedLength":399,"gzipLength":0,"brotliLength":0,"metaUid":"5e72988a-2"},"5e72988a-5":{"renderedLength":421,"gzipLength":0,"brotliLength":0,"metaUid":"5e72988a-4"},"5e72988a-7":{"renderedLength":448,"gzipLength":0,"brotliLength":0,"metaUid":"5e72988a-6"},"5e72988a-9":{"renderedLength":719,"gzipLength":0,"brotliLength":0,"metaUid":"5e72988a-8"},"5e72988a-11":{"renderedLength":299,"gzipLength":0,"brotliLength":0,"metaUid":"5e72988a-10"}},"nodeMetas":{"5e72988a-0":{"id":"/dist/browser/Utils.js","moduleParts":{"tsparticles.shape.polygon.js":"5e72988a-1"},"imported":[{"uid":"5e72988a-12"}],"importedBy":[{"uid":"5e72988a-2"}]},"5e72988a-2":{"id":"/dist/browser/PolygonDrawerBase.js","moduleParts":{"tsparticles.shape.polygon.js":"5e72988a-3"},"imported":[{"uid":"5e72988a-12"},{"uid":"5e72988a-0"}],"importedBy":[{"uid":"5e72988a-4"},{"uid":"5e72988a-6"}]},"5e72988a-4":{"id":"/dist/browser/PolygonDrawer.js","moduleParts":{"tsparticles.shape.polygon.js":"5e72988a-5"},"imported":[{"uid":"5e72988a-2"}],"importedBy":[{"uid":"5e72988a-8"}]},"5e72988a-6":{"id":"/dist/browser/TriangleDrawer.js","moduleParts":{"tsparticles.shape.polygon.js":"5e72988a-7"},"imported":[{"uid":"5e72988a-2"}],"importedBy":[{"uid":"5e72988a-8"}]},"5e72988a-8":{"id":"/dist/browser/index.js","moduleParts":{"tsparticles.shape.polygon.js":"5e72988a-9"},"imported":[{"uid":"5e72988a-4"},{"uid":"5e72988a-6"}],"importedBy":[{"uid":"5e72988a-10"}]},"5e72988a-10":{"id":"/dist/browser/browser.js","moduleParts":{"tsparticles.shape.polygon.js":"5e72988a-11"},"imported":[{"uid":"5e72988a-8"}],"importedBy":[],"isEntry":true},"5e72988a-12":{"id":"@tsparticles/engine","moduleParts":{},"imported":[],"importedBy":[{"uid":"5e72988a-2"},{"uid":"5e72988a-0"}],"isExternal":true}},"env":{"rollup":"4.60.3"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
4933
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"tsparticles.shape.polygon.js","children":[{"name":"dist/browser","children":[{"uid":"bc7d14c4-1","name":"Utils.js"},{"uid":"bc7d14c4-3","name":"PolygonDrawerBase.js"},{"uid":"bc7d14c4-5","name":"PolygonDrawer.js"},{"uid":"bc7d14c4-7","name":"TriangleDrawer.js"},{"uid":"bc7d14c4-9","name":"index.js"},{"uid":"bc7d14c4-11","name":"browser.js"}]}]}],"isRoot":true},"nodeParts":{"bc7d14c4-1":{"renderedLength":1226,"gzipLength":0,"brotliLength":0,"metaUid":"bc7d14c4-0"},"bc7d14c4-3":{"renderedLength":399,"gzipLength":0,"brotliLength":0,"metaUid":"bc7d14c4-2"},"bc7d14c4-5":{"renderedLength":421,"gzipLength":0,"brotliLength":0,"metaUid":"bc7d14c4-4"},"bc7d14c4-7":{"renderedLength":448,"gzipLength":0,"brotliLength":0,"metaUid":"bc7d14c4-6"},"bc7d14c4-9":{"renderedLength":719,"gzipLength":0,"brotliLength":0,"metaUid":"bc7d14c4-8"},"bc7d14c4-11":{"renderedLength":299,"gzipLength":0,"brotliLength":0,"metaUid":"bc7d14c4-10"}},"nodeMetas":{"bc7d14c4-0":{"id":"/dist/browser/Utils.js","moduleParts":{"tsparticles.shape.polygon.js":"bc7d14c4-1"},"imported":[{"uid":"bc7d14c4-12"}],"importedBy":[{"uid":"bc7d14c4-2"}]},"bc7d14c4-2":{"id":"/dist/browser/PolygonDrawerBase.js","moduleParts":{"tsparticles.shape.polygon.js":"bc7d14c4-3"},"imported":[{"uid":"bc7d14c4-12"},{"uid":"bc7d14c4-0"}],"importedBy":[{"uid":"bc7d14c4-4"},{"uid":"bc7d14c4-6"}]},"bc7d14c4-4":{"id":"/dist/browser/PolygonDrawer.js","moduleParts":{"tsparticles.shape.polygon.js":"bc7d14c4-5"},"imported":[{"uid":"bc7d14c4-2"}],"importedBy":[{"uid":"bc7d14c4-8"}]},"bc7d14c4-6":{"id":"/dist/browser/TriangleDrawer.js","moduleParts":{"tsparticles.shape.polygon.js":"bc7d14c4-7"},"imported":[{"uid":"bc7d14c4-2"}],"importedBy":[{"uid":"bc7d14c4-8"}]},"bc7d14c4-8":{"id":"/dist/browser/index.js","moduleParts":{"tsparticles.shape.polygon.js":"bc7d14c4-9"},"imported":[{"uid":"bc7d14c4-4"},{"uid":"bc7d14c4-6"}],"importedBy":[{"uid":"bc7d14c4-10"}]},"bc7d14c4-10":{"id":"/dist/browser/browser.js","moduleParts":{"tsparticles.shape.polygon.js":"bc7d14c4-11"},"imported":[{"uid":"bc7d14c4-8"}],"importedBy":[],"isEntry":true},"bc7d14c4-12":{"id":"@tsparticles/engine","moduleParts":{},"imported":[],"importedBy":[{"uid":"bc7d14c4-2"},{"uid":"bc7d14c4-0"}],"isExternal":true}},"env":{"rollup":"4.60.4"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
4934
4934
 
4935
4935
  const run = () => {
4936
4936
  const width = window.innerWidth;
@@ -1,5 +1,5 @@
1
1
  (function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);g.tsparticlesInternalExports=g.tsparticlesInternalExports||{};})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
2
- /* Shape v4.0.1 */
2
+ /* Shape v4.0.3 */
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/engine')) :
5
5
  typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/engine'], factory) :
@@ -85,19 +85,19 @@
85
85
  }
86
86
 
87
87
  async function loadGenericPolygonShape(engine) {
88
- engine.checkVersion("4.0.1");
88
+ engine.checkVersion("4.0.3");
89
89
  await engine.pluginManager.register(e => {
90
90
  e.pluginManager.addShape(["polygon"], () => Promise.resolve(new PolygonDrawer()));
91
91
  });
92
92
  }
93
93
  async function loadTriangleShape(engine) {
94
- engine.checkVersion("4.0.1");
94
+ engine.checkVersion("4.0.3");
95
95
  await engine.pluginManager.register(e => {
96
96
  e.pluginManager.addShape(["triangle"], () => Promise.resolve(new TriangleDrawer()));
97
97
  });
98
98
  }
99
99
  async function loadPolygonShape(engine) {
100
- engine.checkVersion("4.0.1");
100
+ engine.checkVersion("4.0.3");
101
101
  await Promise.all([
102
102
  loadGenericPolygonShape(engine),
103
103
  loadTriangleShape(engine),
@@ -1 +1 @@
1
- !function(s){s.__tsParticlesInternals=s.__tsParticlesInternals||{},s.__tsParticlesInternals.bundles=s.__tsParticlesInternals.bundles||{},s.__tsParticlesInternals.effects=s.__tsParticlesInternals.effects||{},s.__tsParticlesInternals.engine=s.__tsParticlesInternals.engine||{},s.__tsParticlesInternals.interactions=s.__tsParticlesInternals.interactions||{},s.__tsParticlesInternals.palettes=s.__tsParticlesInternals.palettes||{},s.__tsParticlesInternals.paths=s.__tsParticlesInternals.paths||{},s.__tsParticlesInternals.plugins=s.__tsParticlesInternals.plugins||{},s.__tsParticlesInternals.plugins=s.__tsParticlesInternals.plugins||{},s.__tsParticlesInternals.plugins.emittersShapes=s.__tsParticlesInternals.plugins.emittersShapes||{},s.__tsParticlesInternals.presets=s.__tsParticlesInternals.presets||{},s.__tsParticlesInternals.shapes=s.__tsParticlesInternals.shapes||{},s.__tsParticlesInternals.updaters=s.__tsParticlesInternals.updaters||{},s.__tsParticlesInternals.utils=s.__tsParticlesInternals.utils||{},s.__tsParticlesInternals.canvas=s.__tsParticlesInternals.canvas||{},s.__tsParticlesInternals.canvas=s.__tsParticlesInternals.canvas||{},s.__tsParticlesInternals.canvas.utils=s.__tsParticlesInternals.canvas.utils||{},s.__tsParticlesInternals.path=s.__tsParticlesInternals.path||{},s.__tsParticlesInternals.path=s.__tsParticlesInternals.path||{},s.__tsParticlesInternals.path.utils=s.__tsParticlesInternals.path.utils||{};var t="undefined"!=typeof Proxy?function(s){return new Proxy(s,{get:function(s,t){return t in s||(s[t]={}),s[t]}})}:function(s){return s};s.__tsParticlesInternals.bundles=t(s.__tsParticlesInternals.bundles),s.__tsParticlesInternals.effects=t(s.__tsParticlesInternals.effects),s.__tsParticlesInternals.interactions=t(s.__tsParticlesInternals.interactions),s.__tsParticlesInternals.palettes=t(s.__tsParticlesInternals.palettes),s.__tsParticlesInternals.paths=t(s.__tsParticlesInternals.paths),s.__tsParticlesInternals.plugins=t(s.__tsParticlesInternals.plugins),s.__tsParticlesInternals.plugins.emittersShapes=t(s.__tsParticlesInternals.plugins.emittersShapes),s.__tsParticlesInternals.presets=t(s.__tsParticlesInternals.presets),s.__tsParticlesInternals.shapes=t(s.__tsParticlesInternals.shapes),s.__tsParticlesInternals.updaters=t(s.__tsParticlesInternals.updaters),s.__tsParticlesInternals.utils=t(s.__tsParticlesInternals.utils),s.__tsParticlesInternals.canvas=t(s.__tsParticlesInternals.canvas),s.__tsParticlesInternals.path=t(s.__tsParticlesInternals.path),s.tsparticlesInternalExports=s.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(s,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@tsparticles/engine")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/engine"],t):t(((s="undefined"!=typeof globalThis?globalThis:s||self).__tsParticlesInternals=s.__tsParticlesInternals||{},s.__tsParticlesInternals.shapes=s.__tsParticlesInternals.shapes||{},s.__tsParticlesInternals.shapes.polygon=s.__tsParticlesInternals.shapes.polygon||{}),s.__tsParticlesInternals.engine)}(this,function(s,t){"use strict";const e=new Map;function n(s,n){const{context:a,radius:l}=s,r=function(s){const n=e.get(s);if(n)return n;const a=t.doublePI/s,l=!!(s%t.double),r=(-Math.PI+(l?0:a))*t.half,i=[];for(let t=0;t<s;t++){const s=r+t*a;i[t]={x:Math.cos(s),y:Math.sin(s)}}return e.set(s,i),i}(n.count.numerator/n.count.denominator);a.beginPath();for(let s=0;s<r.length;s++){const t=r[s];if(!t)continue;const e=t.x*l,n=t.y*l;s?a.lineTo(e,n):a.moveTo(e,n)}a.closePath()}class a{draw(s){const{particle:t,radius:e}=s;n(s,this.getSidesData(t,e))}getSidesCount(s){const e=s.shapeData;return Math.round(t.getRangeValue(e?.sides??5))}}class l extends a{getSidesData(s,t){const{sides:e}=s;return{count:{denominator:1,numerator:e},length:2.66*t/(e/3)}}}class r extends a{getSidesCount(){return 3}getSidesData(s,t){return{count:{denominator:1,numerator:3},length:2.66*t/1}}}async function i(s){s.checkVersion("4.0.1"),await s.pluginManager.register(s=>{s.pluginManager.addShape(["polygon"],()=>Promise.resolve(new l))})}async function _(s){s.checkVersion("4.0.1"),await s.pluginManager.register(s=>{s.pluginManager.addShape(["triangle"],()=>Promise.resolve(new r))})}async function c(s){s.checkVersion("4.0.1"),await Promise.all([i(s),_(s)])}const o=globalThis;o.__tsParticlesInternals=o.__tsParticlesInternals??{},o.loadGenericPolygonShape=i,o.loadPolygonShape=c,o.loadTriangleShape=_,s.loadGenericPolygonShape=i,s.loadPolygonShape=c,s.loadTriangleShape=_}),Object.assign(globalThis.window||globalThis,{loadGenericPolygonShape:(globalThis.__tsParticlesInternals.shapes.polygon||{}).loadGenericPolygonShape,loadPolygonShape:(globalThis.__tsParticlesInternals.shapes.polygon||{}).loadPolygonShape,loadTriangleShape:(globalThis.__tsParticlesInternals.shapes.polygon||{}).loadTriangleShape}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
1
+ !function(s){s.__tsParticlesInternals=s.__tsParticlesInternals||{},s.__tsParticlesInternals.bundles=s.__tsParticlesInternals.bundles||{},s.__tsParticlesInternals.effects=s.__tsParticlesInternals.effects||{},s.__tsParticlesInternals.engine=s.__tsParticlesInternals.engine||{},s.__tsParticlesInternals.interactions=s.__tsParticlesInternals.interactions||{},s.__tsParticlesInternals.palettes=s.__tsParticlesInternals.palettes||{},s.__tsParticlesInternals.paths=s.__tsParticlesInternals.paths||{},s.__tsParticlesInternals.plugins=s.__tsParticlesInternals.plugins||{},s.__tsParticlesInternals.plugins=s.__tsParticlesInternals.plugins||{},s.__tsParticlesInternals.plugins.emittersShapes=s.__tsParticlesInternals.plugins.emittersShapes||{},s.__tsParticlesInternals.presets=s.__tsParticlesInternals.presets||{},s.__tsParticlesInternals.shapes=s.__tsParticlesInternals.shapes||{},s.__tsParticlesInternals.updaters=s.__tsParticlesInternals.updaters||{},s.__tsParticlesInternals.utils=s.__tsParticlesInternals.utils||{},s.__tsParticlesInternals.canvas=s.__tsParticlesInternals.canvas||{},s.__tsParticlesInternals.canvas=s.__tsParticlesInternals.canvas||{},s.__tsParticlesInternals.canvas.utils=s.__tsParticlesInternals.canvas.utils||{},s.__tsParticlesInternals.path=s.__tsParticlesInternals.path||{},s.__tsParticlesInternals.path=s.__tsParticlesInternals.path||{},s.__tsParticlesInternals.path.utils=s.__tsParticlesInternals.path.utils||{};var t="undefined"!=typeof Proxy?function(s){return new Proxy(s,{get:function(s,t){return t in s||(s[t]={}),s[t]}})}:function(s){return s};s.__tsParticlesInternals.bundles=t(s.__tsParticlesInternals.bundles),s.__tsParticlesInternals.effects=t(s.__tsParticlesInternals.effects),s.__tsParticlesInternals.interactions=t(s.__tsParticlesInternals.interactions),s.__tsParticlesInternals.palettes=t(s.__tsParticlesInternals.palettes),s.__tsParticlesInternals.paths=t(s.__tsParticlesInternals.paths),s.__tsParticlesInternals.plugins=t(s.__tsParticlesInternals.plugins),s.__tsParticlesInternals.plugins.emittersShapes=t(s.__tsParticlesInternals.plugins.emittersShapes),s.__tsParticlesInternals.presets=t(s.__tsParticlesInternals.presets),s.__tsParticlesInternals.shapes=t(s.__tsParticlesInternals.shapes),s.__tsParticlesInternals.updaters=t(s.__tsParticlesInternals.updaters),s.__tsParticlesInternals.utils=t(s.__tsParticlesInternals.utils),s.__tsParticlesInternals.canvas=t(s.__tsParticlesInternals.canvas),s.__tsParticlesInternals.path=t(s.__tsParticlesInternals.path),s.tsparticlesInternalExports=s.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(s,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@tsparticles/engine")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/engine"],t):t(((s="undefined"!=typeof globalThis?globalThis:s||self).__tsParticlesInternals=s.__tsParticlesInternals||{},s.__tsParticlesInternals.shapes=s.__tsParticlesInternals.shapes||{},s.__tsParticlesInternals.shapes.polygon=s.__tsParticlesInternals.shapes.polygon||{}),s.__tsParticlesInternals.engine)}(this,function(s,t){"use strict";const e=new Map;function n(s,n){const{context:a,radius:l}=s,r=function(s){const n=e.get(s);if(n)return n;const a=t.doublePI/s,l=!!(s%t.double),r=(-Math.PI+(l?0:a))*t.half,i=[];for(let t=0;t<s;t++){const s=r+t*a;i[t]={x:Math.cos(s),y:Math.sin(s)}}return e.set(s,i),i}(n.count.numerator/n.count.denominator);a.beginPath();for(let s=0;s<r.length;s++){const t=r[s];if(!t)continue;const e=t.x*l,n=t.y*l;s?a.lineTo(e,n):a.moveTo(e,n)}a.closePath()}class a{draw(s){const{particle:t,radius:e}=s;n(s,this.getSidesData(t,e))}getSidesCount(s){const e=s.shapeData;return Math.round(t.getRangeValue(e?.sides??5))}}class l extends a{getSidesData(s,t){const{sides:e}=s;return{count:{denominator:1,numerator:e},length:2.66*t/(e/3)}}}class r extends a{getSidesCount(){return 3}getSidesData(s,t){return{count:{denominator:1,numerator:3},length:2.66*t/1}}}async function i(s){s.checkVersion("4.0.3"),await s.pluginManager.register(s=>{s.pluginManager.addShape(["polygon"],()=>Promise.resolve(new l))})}async function _(s){s.checkVersion("4.0.3"),await s.pluginManager.register(s=>{s.pluginManager.addShape(["triangle"],()=>Promise.resolve(new r))})}async function c(s){s.checkVersion("4.0.3"),await Promise.all([i(s),_(s)])}const o=globalThis;o.__tsParticlesInternals=o.__tsParticlesInternals??{},o.loadGenericPolygonShape=i,o.loadPolygonShape=c,o.loadTriangleShape=_,s.loadGenericPolygonShape=i,s.loadPolygonShape=c,s.loadTriangleShape=_}),Object.assign(globalThis.window||globalThis,{loadGenericPolygonShape:(globalThis.__tsParticlesInternals.shapes.polygon||{}).loadGenericPolygonShape,loadPolygonShape:(globalThis.__tsParticlesInternals.shapes.polygon||{}).loadPolygonShape,loadTriangleShape:(globalThis.__tsParticlesInternals.shapes.polygon||{}).loadTriangleShape}),delete(globalThis.window||globalThis).tsparticlesInternalExports;