@tsparticles/shape-path 4.0.0-beta.0 → 4.0.0-beta.10

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.
@@ -1 +1 @@
1
- "use strict";(this.webpackChunk_tsparticles_shape_path=this.webpackChunk_tsparticles_shape_path||[]).push([[374],{374(a,t,e){e.d(t,{PathDrawer:()=>s});var h=e(303),p=e(580);class s{draw(a){let{context:t,particle:e,radius:h}=a;e.pathData&&(0,p.drawPath)(t,h,e.pathData)}particleInit(a,t){let e=t.shapeData;e&&(t.pathData=(0,h.deepExtend)({},e))}}}}]);
1
+ "use strict";(this.webpackChunk_tsparticles_shape_path=this.webpackChunk_tsparticles_shape_path||[]).push([[297],{297(a,t,e){e.d(t,{PathDrawer:()=>s});var h=e(303),p=e(580);class s{draw(a){let{context:t,particle:e,radius:h}=a;e.pathData&&(0,p.drawPath)(t,h,e.pathData)}particleInit(a,t){let e=t.shapeData;e&&(t.pathData=(0,h.deepExtend)({},e))}}}}]);
package/README.md CHANGED
@@ -8,6 +8,12 @@
8
8
 
9
9
  [tsParticles](https://github.com/tsparticles/tsparticles) additional path shape.
10
10
 
11
+ ## Quick checklist
12
+
13
+ 1. Install `@tsparticles/engine` (or use the CDN bundle below)
14
+ 2. Call the package loader function(s) before `tsParticles.load(...)`
15
+ 3. Apply the package options in your `tsParticles.load(...)` config
16
+
11
17
  ## How to use it
12
18
 
13
19
  ### CDN / Vanilla JS / jQuery
@@ -73,3 +79,32 @@ import { loadPathShape } from "@tsparticles/shape-path";
73
79
  await loadPathShape(tsParticles);
74
80
  })();
75
81
  ```
82
+
83
+ ## Option mapping
84
+
85
+ - Primary options key: `particles.shape.type: "path"`
86
+ - Shape-specific options key: `particles.shape.options.path`
87
+
88
+ ```json
89
+ {
90
+ "particles": {
91
+ "shape": {
92
+ "type": "path",
93
+ "options": {
94
+ "path": {}
95
+ }
96
+ }
97
+ }
98
+ }
99
+ ```
100
+
101
+ ## Common pitfalls
102
+
103
+ - Calling `tsParticles.load(...)` before `loadPathShape(...)`
104
+ - Verify required peer packages before enabling advanced options
105
+ - Change one option group at a time to isolate regressions quickly
106
+
107
+ ## Related docs
108
+
109
+ - All packages catalog: <https://github.com/tsparticles/tsparticles>
110
+ - Main docs: <https://particles.js.org/docs/>
package/browser/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export async function loadPathShape(engine) {
2
- engine.checkVersion("4.0.0-beta.0");
3
- await engine.register(e => {
4
- e.addShape(["path"], async () => {
2
+ engine.checkVersion("4.0.0-beta.10");
3
+ await engine.pluginManager.register(e => {
4
+ e.pluginManager.addShape(["path"], async () => {
5
5
  const { PathDrawer } = await import("./PathDrawer.js");
6
6
  return new PathDrawer();
7
7
  });
package/cjs/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export async function loadPathShape(engine) {
2
- engine.checkVersion("4.0.0-beta.0");
3
- await engine.register(e => {
4
- e.addShape(["path"], async () => {
2
+ engine.checkVersion("4.0.0-beta.10");
3
+ await engine.pluginManager.register(e => {
4
+ e.pluginManager.addShape(["path"], async () => {
5
5
  const { PathDrawer } = await import("./PathDrawer.js");
6
6
  return new PathDrawer();
7
7
  });
@@ -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.10
8
8
  */
9
9
  "use strict";
10
10
  /*
package/esm/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export async function loadPathShape(engine) {
2
- engine.checkVersion("4.0.0-beta.0");
3
- await engine.register(e => {
4
- e.addShape(["path"], async () => {
2
+ engine.checkVersion("4.0.0-beta.10");
3
+ await engine.pluginManager.register(e => {
4
+ e.pluginManager.addShape(["path"], async () => {
5
5
  const { PathDrawer } = await import("./PathDrawer.js");
6
6
  return new PathDrawer();
7
7
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/shape-path",
3
- "version": "4.0.0-beta.0",
3
+ "version": "4.0.0-beta.10",
4
4
  "description": "tsParticles path shape",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -94,14 +94,13 @@
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",
104
- "@tsparticles/path-utils": "4.0.0-beta.0"
101
+ "peerDependencies": {
102
+ "@tsparticles/engine": "4.0.0-beta.10",
103
+ "@tsparticles/path-utils": "4.0.0-beta.10"
105
104
  },
106
105
  "publishConfig": {
107
106
  "access": "public"