@tsparticles/shape-cog 4.5.2 → 4.5.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,6 +1,6 @@
1
1
  import { CogDrawer } from "./CogDrawer.js";
2
2
  export async function loadCogShape(engine) {
3
- engine.checkVersion("4.5.2");
3
+ engine.checkVersion("4.5.3");
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.2");
2
+ engine.checkVersion("4.5.3");
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/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.2");
3
+ engine.checkVersion("4.5.3");
4
4
  await engine.pluginManager.register(e => {
5
5
  e.pluginManager.addShape(["cog"], () => Promise.resolve(new CogDrawer()));
6
6
  });
package/cjs/index.lazy.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export async function loadCogShape(engine) {
2
- engine.checkVersion("4.5.2");
2
+ engine.checkVersion("4.5.3");
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/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.2");
3
+ engine.checkVersion("4.5.3");
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.2");
2
+ engine.checkVersion("4.5.3");
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.2",
3
+ "version": "4.5.3",
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.2"
109
+ "@tsparticles/engine": "4.5.3"
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.2 */
3
+ /* Shape v4.5.3 */
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.2");
72
+ engine.checkVersion("4.5.3");
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.2"),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.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});