@tsparticles/shape-spiral 4.0.0-beta.0 → 4.0.0-beta.2

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/515.min.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunk_tsparticles_shape_spiral=this.webpackChunk_tsparticles_shape_spiral||[]).push([[515],{515(a,i,e){e.d(i,{SpiralDrawer:()=>s});var r=e(303);class s{draw(a){!function(a){let{context:i,particle:e,radius:r}=a;if(void 0===e.spiralInnerRadius||void 0===e.spiralLineSpacing||void 0===e.spiralWidthFactor)return;let s=(r-e.spiralInnerRadius)/e.spiralLineSpacing;for(let a=0;a<10*s;a++){let r=a/10,s=e.spiralInnerRadius+e.spiralLineSpacing*r,n={x:s*Math.cos(r),y:s*Math.sin(r)};i.lineTo(n.x,n.y)}}(a)}particleInit(a,i){let e=a.retina.pixelRatio,s=i.shapeData;i.spiralInnerRadius=(0,r.getRangeValue)(s?.innerRadius??1)*e,i.spiralLineSpacing=(0,r.getRangeValue)(s?.lineSpacing??1)*e,i.spiralWidthFactor=(0,r.getRangeValue)(s?.widthFactor??10)}}}}]);
package/browser/index.js CHANGED
@@ -1,7 +1,8 @@
1
+ import {} from "@tsparticles/engine";
1
2
  export async function loadSpiralShape(engine) {
2
- engine.checkVersion("4.0.0-beta.0");
3
- await engine.register(e => {
4
- e.addShape(["spiral"], async () => {
3
+ engine.checkVersion("4.0.0-beta.2");
4
+ await engine.pluginManager.register(e => {
5
+ e.pluginManager.addShape(["spiral"], async () => {
5
6
  const { SpiralDrawer } = await import("./SpiralDrawer.js");
6
7
  return new SpiralDrawer();
7
8
  });
package/cjs/index.js CHANGED
@@ -1,7 +1,8 @@
1
+ import {} from "@tsparticles/engine";
1
2
  export async function loadSpiralShape(engine) {
2
- engine.checkVersion("4.0.0-beta.0");
3
- await engine.register(e => {
4
- e.addShape(["spiral"], async () => {
3
+ engine.checkVersion("4.0.0-beta.2");
4
+ await engine.pluginManager.register(e => {
5
+ e.pluginManager.addShape(["spiral"], async () => {
5
6
  const { SpiralDrawer } = await import("./SpiralDrawer.js");
6
7
  return new SpiralDrawer();
7
8
  });
@@ -4,7 +4,7 @@
4
4
  * Demo / Generator : https://particles.js.org/
5
5
  * GitHub : https://www.github.com/matteobruni/tsparticles
6
6
  * How to use? : Check the GitHub README
7
- * v4.0.0-beta.0
7
+ * v4.0.0-beta.2
8
8
  */
9
9
  "use strict";
10
10
  /*
package/esm/index.js CHANGED
@@ -1,7 +1,8 @@
1
+ import {} from "@tsparticles/engine";
1
2
  export async function loadSpiralShape(engine) {
2
- engine.checkVersion("4.0.0-beta.0");
3
- await engine.register(e => {
4
- e.addShape(["spiral"], async () => {
3
+ engine.checkVersion("4.0.0-beta.2");
4
+ await engine.pluginManager.register(e => {
5
+ e.pluginManager.addShape(["spiral"], async () => {
5
6
  const { SpiralDrawer } = await import("./SpiralDrawer.js");
6
7
  return new SpiralDrawer();
7
8
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/shape-spiral",
3
- "version": "4.0.0-beta.0",
3
+ "version": "4.0.0-beta.2",
4
4
  "description": "tsParticles spiral shape",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -94,13 +94,12 @@
94
94
  "browser": "./browser/index.js",
95
95
  "import": "./esm/index.js",
96
96
  "require": "./cjs/index.js",
97
- "umd": "./umd/index.js",
98
- "default": "./cjs/index.js"
97
+ "default": "./esm/index.js"
99
98
  },
100
99
  "./package.json": "./package.json"
101
100
  },
102
- "dependencies": {
103
- "@tsparticles/engine": "4.0.0-beta.0"
101
+ "peerDependencies": {
102
+ "@tsparticles/engine": "4.0.0-beta.1"
104
103
  },
105
104
  "publishConfig": {
106
105
  "access": "public"