@tsparticles/shape-cog 4.5.3 → 4.6.0

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,6 +1,6 @@
1
1
  import { CogDrawer } from "./CogDrawer.js";
2
2
  export async function loadCogShape(engine) {
3
- engine.checkVersion("4.5.3");
3
+ engine.checkVersion("4.6.0");
4
4
  await engine.pluginManager.register(e => {
5
5
  e.pluginManager.addShape(["cog"], () => Promise.resolve(new CogDrawer()));
6
6
  });
@@ -1,5 +1,5 @@
1
1
  export async function loadCogShape(engine) {
2
- engine.checkVersion("4.5.3");
2
+ engine.checkVersion("4.6.0");
3
3
  await engine.pluginManager.register(async (e) => {
4
4
  const { CogDrawer } = await import("./CogDrawer.js");
5
5
  e.pluginManager.addShape(["cog"], () => Promise.resolve(new CogDrawer()));
package/cjs/CogDrawer.js CHANGED
@@ -1,19 +1,23 @@
1
- import { getRangeValue } from "@tsparticles/engine";
2
- import { drawCog, drawCogHole } from "./Utils.js";
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CogDrawer = void 0;
4
+ const engine_1 = require("@tsparticles/engine");
5
+ const Utils_js_1 = require("./Utils.js");
3
6
  const defaultHoleRadius = 44, defaultInnerRadius = 72, defaultInnerTaper = 35, defaultNotches = 7, defaultOuterTaper = 50;
4
- export class CogDrawer {
7
+ class CogDrawer {
5
8
  afterDraw(data) {
6
- drawCogHole(data);
9
+ (0, Utils_js_1.drawCogHole)(data);
7
10
  }
8
11
  draw(data) {
9
- drawCog(data);
12
+ (0, Utils_js_1.drawCog)(data);
10
13
  }
11
14
  particleInit(_container, particle) {
12
15
  const shapeData = particle.shapeData;
13
- particle.cogHoleRadius = getRangeValue(shapeData?.holeRadius ?? defaultHoleRadius);
14
- particle.cogInnerRadius = getRangeValue(shapeData?.innerRadius ?? defaultInnerRadius);
15
- particle.cogInnerTaper = getRangeValue(shapeData?.innerTaper ?? defaultInnerTaper);
16
- particle.cogNotches = getRangeValue(shapeData?.notches ?? defaultNotches);
17
- particle.cogOuterTaper = getRangeValue(shapeData?.outerTaper ?? defaultOuterTaper);
16
+ particle.cogHoleRadius = (0, engine_1.getRangeValue)(shapeData?.holeRadius ?? defaultHoleRadius);
17
+ particle.cogInnerRadius = (0, engine_1.getRangeValue)(shapeData?.innerRadius ?? defaultInnerRadius);
18
+ particle.cogInnerTaper = (0, engine_1.getRangeValue)(shapeData?.innerTaper ?? defaultInnerTaper);
19
+ particle.cogNotches = (0, engine_1.getRangeValue)(shapeData?.notches ?? defaultNotches);
20
+ particle.cogOuterTaper = (0, engine_1.getRangeValue)(shapeData?.outerTaper ?? defaultOuterTaper);
18
21
  }
19
22
  }
23
+ exports.CogDrawer = CogDrawer;
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/cjs/ICogData.js CHANGED
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/cjs/Utils.js CHANGED
@@ -1,6 +1,10 @@
1
- import { double, doublePI, originPoint, percentDenominator } from "@tsparticles/engine";
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.drawCogHole = drawCogHole;
4
+ exports.drawCog = drawCog;
5
+ const engine_1 = require("@tsparticles/engine");
2
6
  const minAngle = 0, taperFactor = 0.005;
3
- export function drawCogHole(data) {
7
+ function drawCogHole(data) {
4
8
  const { context, particle, radius } = data;
5
9
  if (particle.cogHoleRadius === undefined ||
6
10
  particle.cogInnerRadius === undefined ||
@@ -9,16 +13,16 @@ export function drawCogHole(data) {
9
13
  particle.cogOuterTaper === undefined) {
10
14
  return;
11
15
  }
12
- const holeRadius = (radius * particle.cogHoleRadius) / percentDenominator;
16
+ const holeRadius = (radius * particle.cogHoleRadius) / engine_1.percentDenominator;
13
17
  context.globalCompositeOperation = "destination-out";
14
18
  context.beginPath();
15
- context.moveTo(holeRadius, originPoint.y);
16
- context.arc(originPoint.x, originPoint.y, holeRadius, minAngle, doublePI);
19
+ context.moveTo(holeRadius, engine_1.originPoint.y);
20
+ context.arc(engine_1.originPoint.x, engine_1.originPoint.y, holeRadius, minAngle, engine_1.doublePI);
17
21
  context.closePath();
18
22
  context.fill();
19
23
  context.globalCompositeOperation = "source-over";
20
24
  }
21
- export function drawCog(data) {
25
+ function drawCog(data) {
22
26
  const { context, particle, radius } = data;
23
27
  if (particle.cogHoleRadius === undefined ||
24
28
  particle.cogInnerRadius === undefined ||
@@ -27,10 +31,10 @@ export function drawCog(data) {
27
31
  particle.cogOuterTaper === undefined) {
28
32
  return;
29
33
  }
30
- const angle = doublePI / (particle.cogNotches * double), taperAI = angle * particle.cogInnerTaper * taperFactor, taperAO = angle * particle.cogOuterTaper * taperFactor, innerRadius = (radius * particle.cogInnerRadius) / percentDenominator;
34
+ const angle = engine_1.doublePI / (particle.cogNotches * engine_1.double), taperAI = angle * particle.cogInnerTaper * taperFactor, taperAO = angle * particle.cogOuterTaper * taperFactor, innerRadius = (radius * particle.cogInnerRadius) / engine_1.percentDenominator;
31
35
  let a = angle, toggle = false;
32
36
  context.moveTo(radius * Math.cos(taperAO), radius * Math.sin(taperAO));
33
- for (; a <= doublePI; a += angle) {
37
+ for (; a <= engine_1.doublePI; a += angle) {
34
38
  if (toggle) {
35
39
  context.lineTo(innerRadius * Math.cos(a - taperAI), innerRadius * Math.sin(a - taperAI));
36
40
  context.lineTo(radius * Math.cos(a + taperAO), radius * Math.sin(a + taperAO));
package/cjs/browser.js CHANGED
@@ -1,5 +1,21 @@
1
- import { loadCogShape } from "./index.js";
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ const index_js_1 = require("./index.js");
2
18
  const globalObject = globalThis;
3
19
  globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
4
- globalObject.loadCogShape = loadCogShape;
5
- export * from "./index.js";
20
+ globalObject.loadCogShape = index_js_1.loadCogShape;
21
+ __exportStar(require("./index.js"), exports);
package/cjs/index.js CHANGED
@@ -1,7 +1,10 @@
1
- import { CogDrawer } from "./CogDrawer.js";
2
- export async function loadCogShape(engine) {
3
- engine.checkVersion("4.5.3");
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.loadCogShape = loadCogShape;
4
+ const CogDrawer_js_1 = require("./CogDrawer.js");
5
+ async function loadCogShape(engine) {
6
+ engine.checkVersion("4.6.0");
4
7
  await engine.pluginManager.register(e => {
5
- e.pluginManager.addShape(["cog"], () => Promise.resolve(new CogDrawer()));
8
+ e.pluginManager.addShape(["cog"], () => Promise.resolve(new CogDrawer_js_1.CogDrawer()));
6
9
  });
7
10
  }
package/cjs/index.lazy.js CHANGED
@@ -1,5 +1,8 @@
1
- export async function loadCogShape(engine) {
2
- engine.checkVersion("4.5.3");
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.loadCogShape = loadCogShape;
4
+ async function loadCogShape(engine) {
5
+ engine.checkVersion("4.6.0");
3
6
  await engine.pluginManager.register(async (e) => {
4
7
  const { CogDrawer } = await import("./CogDrawer.js");
5
8
  e.pluginManager.addShape(["cog"], () => Promise.resolve(new CogDrawer()));
package/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { CogDrawer } from "./CogDrawer.js";
2
2
  export async function loadCogShape(engine) {
3
- engine.checkVersion("4.5.3");
3
+ engine.checkVersion("4.6.0");
4
4
  await engine.pluginManager.register(e => {
5
5
  e.pluginManager.addShape(["cog"], () => Promise.resolve(new CogDrawer()));
6
6
  });
package/esm/index.lazy.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export async function loadCogShape(engine) {
2
- engine.checkVersion("4.5.3");
2
+ engine.checkVersion("4.6.0");
3
3
  await engine.pluginManager.register(async (e) => {
4
4
  const { CogDrawer } = await import("./CogDrawer.js");
5
5
  e.pluginManager.addShape(["cog"], () => Promise.resolve(new CogDrawer()));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/shape-cog",
3
- "version": "4.5.3",
3
+ "version": "4.6.0",
4
4
  "description": "tsParticles cog shape",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -106,7 +106,7 @@
106
106
  "./package.json": "./package.json"
107
107
  },
108
108
  "peerDependencies": {
109
- "@tsparticles/engine": "4.5.3"
109
+ "@tsparticles/engine": "4.6.0"
110
110
  },
111
111
  "publishConfig": {
112
112
  "access": "public"
@@ -1,6 +1,6 @@
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);})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
2
2
  (function (g) {
3
- /* Shape v4.5.3 */
3
+ /* Shape v4.6.0 */
4
4
  g.__tsParticlesInternals = g.__tsParticlesInternals || {};
5
5
  g.__tsParticlesInternals.shapes = g.__tsParticlesInternals.shapes || {};
6
6
  (function (exports, engine) {
@@ -69,7 +69,7 @@ g.__tsParticlesInternals.shapes = g.__tsParticlesInternals.shapes || {};
69
69
  }
70
70
 
71
71
  async function loadCogShape(engine) {
72
- engine.checkVersion("4.5.3");
72
+ engine.checkVersion("4.6.0");
73
73
  await engine.pluginManager.register(e => {
74
74
  e.pluginManager.addShape(["cog"], () => Promise.resolve(new CogDrawer()));
75
75
  });
@@ -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)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(s){s.__tsParticlesInternals=s.__tsParticlesInternals||{},s.__tsParticlesInternals.shapes=s.__tsParticlesInternals.shapes||{},function(s,t){"use strict";class e{afterDraw(s){!function(s){const{context:e,particle:n,radius:a}=s;if(void 0===n.cogHoleRadius||void 0===n.cogInnerRadius||void 0===n.cogInnerTaper||void 0===n.cogNotches||void 0===n.cogOuterTaper)return;const r=a*n.cogHoleRadius/t.percentDenominator;e.globalCompositeOperation="destination-out",e.beginPath(),e.moveTo(r,t.originPoint.y),e.arc(t.originPoint.x,t.originPoint.y,r,0,t.doublePI),e.closePath(),e.fill(),e.globalCompositeOperation="source-over"}(s)}draw(s){!function(s){const{context:e,particle:n,radius:a}=s;if(void 0===n.cogHoleRadius||void 0===n.cogInnerRadius||void 0===n.cogInnerTaper||void 0===n.cogNotches||void 0===n.cogOuterTaper)return;const r=t.doublePI/(n.cogNotches*t.double),l=r*n.cogInnerTaper*.005,i=r*n.cogOuterTaper*.005,c=a*n.cogInnerRadius/t.percentDenominator;let _=r,o=!1;for(e.moveTo(a*Math.cos(i),a*Math.sin(i));_<=t.doublePI;_+=r)o?(e.lineTo(c*Math.cos(_-l),c*Math.sin(_-l)),e.lineTo(a*Math.cos(_+i),a*Math.sin(_+i))):(e.lineTo(a*Math.cos(_-i),a*Math.sin(_-i)),e.lineTo(c*Math.cos(_+l),c*Math.sin(_+l))),o=!o}(s)}particleInit(s,e){const n=e.shapeData;e.cogHoleRadius=t.getRangeValue(n?.holeRadius??44),e.cogInnerRadius=t.getRangeValue(n?.innerRadius??72),e.cogInnerTaper=t.getRangeValue(n?.innerTaper??35),e.cogNotches=t.getRangeValue(n?.notches??7),e.cogOuterTaper=t.getRangeValue(n?.outerTaper??50)}}async function n(s){s.checkVersion("4.5.3"),await s.pluginManager.register(s=>{s.pluginManager.addShape(["cog"],()=>Promise.resolve(new e))})}const a=globalThis;a.__tsParticlesInternals=a.__tsParticlesInternals??{},a.loadCogShape=n,s.loadCogShape=n}(s.__tsParticlesInternals.shapes.cog=s.__tsParticlesInternals.shapes.cog||{},s.__tsParticlesInternals.engine)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:self),Object.assign(globalThis.window||globalThis,{loadCogShape:(globalThis.__tsParticlesInternals.shapes.cog||{}).loadCogShape});
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)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(s){s.__tsParticlesInternals=s.__tsParticlesInternals||{},s.__tsParticlesInternals.shapes=s.__tsParticlesInternals.shapes||{},function(s,t){"use strict";class e{afterDraw(s){!function(s){const{context:e,particle:n,radius:a}=s;if(void 0===n.cogHoleRadius||void 0===n.cogInnerRadius||void 0===n.cogInnerTaper||void 0===n.cogNotches||void 0===n.cogOuterTaper)return;const r=a*n.cogHoleRadius/t.percentDenominator;e.globalCompositeOperation="destination-out",e.beginPath(),e.moveTo(r,t.originPoint.y),e.arc(t.originPoint.x,t.originPoint.y,r,0,t.doublePI),e.closePath(),e.fill(),e.globalCompositeOperation="source-over"}(s)}draw(s){!function(s){const{context:e,particle:n,radius:a}=s;if(void 0===n.cogHoleRadius||void 0===n.cogInnerRadius||void 0===n.cogInnerTaper||void 0===n.cogNotches||void 0===n.cogOuterTaper)return;const r=t.doublePI/(n.cogNotches*t.double),l=r*n.cogInnerTaper*.005,i=r*n.cogOuterTaper*.005,c=a*n.cogInnerRadius/t.percentDenominator;let _=r,o=!1;for(e.moveTo(a*Math.cos(i),a*Math.sin(i));_<=t.doublePI;_+=r)o?(e.lineTo(c*Math.cos(_-l),c*Math.sin(_-l)),e.lineTo(a*Math.cos(_+i),a*Math.sin(_+i))):(e.lineTo(a*Math.cos(_-i),a*Math.sin(_-i)),e.lineTo(c*Math.cos(_+l),c*Math.sin(_+l))),o=!o}(s)}particleInit(s,e){const n=e.shapeData;e.cogHoleRadius=t.getRangeValue(n?.holeRadius??44),e.cogInnerRadius=t.getRangeValue(n?.innerRadius??72),e.cogInnerTaper=t.getRangeValue(n?.innerTaper??35),e.cogNotches=t.getRangeValue(n?.notches??7),e.cogOuterTaper=t.getRangeValue(n?.outerTaper??50)}}async function n(s){s.checkVersion("4.6.0"),await s.pluginManager.register(s=>{s.pluginManager.addShape(["cog"],()=>Promise.resolve(new e))})}const a=globalThis;a.__tsParticlesInternals=a.__tsParticlesInternals??{},a.loadCogShape=n,s.loadCogShape=n}(s.__tsParticlesInternals.shapes.cog=s.__tsParticlesInternals.shapes.cog||{},s.__tsParticlesInternals.engine)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:self),Object.assign(globalThis.window||globalThis,{loadCogShape:(globalThis.__tsParticlesInternals.shapes.cog||{}).loadCogShape});