@tsparticles/shape-line 4.0.0-alpha.5 → 4.0.0-beta.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/264.min.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunk_tsparticles_shape_line=this.webpackChunk_tsparticles_shape_line||[]).push([[264],{264(e,t,s){s.d(t,{LineDrawer:()=>a});class a{draw(e){!function(e){let{context:t,particle:s,radius:a}=e,i=s.shapeData;t.moveTo(-a,0),t.lineTo(a,0),t.lineCap=i?.cap??"butt"}(e)}getSidesCount(){return 1}}}}]);
@@ -1,9 +1,6 @@
1
1
  import { drawLine } from "./Utils.js";
2
2
  const sides = 1;
3
3
  export class LineDrawer {
4
- constructor() {
5
- this.validTypes = ["line"];
6
- }
7
4
  draw(data) {
8
5
  drawLine(data);
9
6
  }
package/browser/index.js CHANGED
@@ -1,7 +1,9 @@
1
1
  export async function loadLineShape(engine) {
2
- engine.checkVersion("4.0.0-alpha.5");
3
- await engine.register(async (e) => {
4
- const { LineDrawer } = await import("./LineDrawer.js");
5
- e.addShape(new LineDrawer());
2
+ engine.checkVersion("4.0.0-beta.0");
3
+ await engine.register(e => {
4
+ e.addShape(["line"], async () => {
5
+ const { LineDrawer } = await import("./LineDrawer.js");
6
+ return new LineDrawer();
7
+ });
6
8
  });
7
9
  }
package/cjs/LineDrawer.js CHANGED
@@ -1,9 +1,6 @@
1
1
  import { drawLine } from "./Utils.js";
2
2
  const sides = 1;
3
3
  export class LineDrawer {
4
- constructor() {
5
- this.validTypes = ["line"];
6
- }
7
4
  draw(data) {
8
5
  drawLine(data);
9
6
  }
package/cjs/index.js CHANGED
@@ -1,7 +1,9 @@
1
1
  export async function loadLineShape(engine) {
2
- engine.checkVersion("4.0.0-alpha.5");
3
- await engine.register(async (e) => {
4
- const { LineDrawer } = await import("./LineDrawer.js");
5
- e.addShape(new LineDrawer());
2
+ engine.checkVersion("4.0.0-beta.0");
3
+ await engine.register(e => {
4
+ e.addShape(["line"], async () => {
5
+ const { LineDrawer } = await import("./LineDrawer.js");
6
+ return new LineDrawer();
7
+ });
6
8
  });
7
9
  }
@@ -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-alpha.5
7
+ * v4.0.0-beta.0
8
8
  */
9
9
  "use strict";
10
10
  /*
@@ -23,7 +23,7 @@
23
23
  \************************************/
24
24
  (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
25
25
 
26
- eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LineDrawer: () => (/* binding */ LineDrawer)\n/* harmony export */ });\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Utils.js */ \"./dist/browser/Utils.js\");\n\nconst sides = 1;\nclass LineDrawer {\n constructor() {\n this.validTypes = [\"line\"];\n }\n draw(data) {\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_0__.drawLine)(data);\n }\n getSidesCount() {\n return sides;\n }\n}\n\n//# sourceURL=webpack://@tsparticles/shape-line/./dist/browser/LineDrawer.js?\n}");
26
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LineDrawer: () => (/* binding */ LineDrawer)\n/* harmony export */ });\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Utils.js */ \"./dist/browser/Utils.js\");\n\nconst sides = 1;\nclass LineDrawer {\n draw(data) {\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_0__.drawLine)(data);\n }\n getSidesCount() {\n return sides;\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/shape-line/./dist/browser/LineDrawer.js?\n}");
27
27
 
28
28
  /***/ },
29
29
 
@@ -33,7 +33,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
33
33
  \*******************************/
34
34
  (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
35
35
 
36
- eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ drawLine: () => (/* binding */ drawLine)\n/* harmony export */ });\nfunction drawLine(data) {\n const {\n context,\n particle,\n radius\n } = data,\n shapeData = particle.shapeData,\n centerY = 0;\n context.moveTo(-radius, centerY);\n context.lineTo(radius, centerY);\n context.lineCap = shapeData?.cap ?? \"butt\";\n}\n\n//# sourceURL=webpack://@tsparticles/shape-line/./dist/browser/Utils.js?\n}");
36
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ drawLine: () => (/* binding */ drawLine)\n/* harmony export */ });\nfunction drawLine(data) {\n const { context, particle, radius } = data, shapeData = particle.shapeData, centerY = 0;\n context.moveTo(-radius, centerY);\n context.lineTo(radius, centerY);\n context.lineCap = shapeData?.cap ?? \"butt\";\n}\n\n\n//# sourceURL=webpack://@tsparticles/shape-line/./dist/browser/Utils.js?\n}");
37
37
 
38
38
  /***/ }
39
39
 
package/esm/LineDrawer.js CHANGED
@@ -1,9 +1,6 @@
1
1
  import { drawLine } from "./Utils.js";
2
2
  const sides = 1;
3
3
  export class LineDrawer {
4
- constructor() {
5
- this.validTypes = ["line"];
6
- }
7
4
  draw(data) {
8
5
  drawLine(data);
9
6
  }
package/esm/index.js CHANGED
@@ -1,7 +1,9 @@
1
1
  export async function loadLineShape(engine) {
2
- engine.checkVersion("4.0.0-alpha.5");
3
- await engine.register(async (e) => {
4
- const { LineDrawer } = await import("./LineDrawer.js");
5
- e.addShape(new LineDrawer());
2
+ engine.checkVersion("4.0.0-beta.0");
3
+ await engine.register(e => {
4
+ e.addShape(["line"], async () => {
5
+ const { LineDrawer } = await import("./LineDrawer.js");
6
+ return new LineDrawer();
7
+ });
6
8
  });
7
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/shape-line",
3
- "version": "4.0.0-alpha.5",
3
+ "version": "4.0.0-beta.0",
4
4
  "description": "tsParticles line shape",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -59,7 +59,7 @@
59
59
  "./package.json": "./package.json"
60
60
  },
61
61
  "dependencies": {
62
- "@tsparticles/engine": "4.0.0-alpha.5"
62
+ "@tsparticles/engine": "4.0.0-beta.0"
63
63
  },
64
64
  "publishConfig": {
65
65
  "access": "public"