@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 +1 -0
- package/browser/LineDrawer.js +0 -3
- package/browser/index.js +6 -4
- package/cjs/LineDrawer.js +0 -3
- package/cjs/index.js +6 -4
- package/dist_browser_LineDrawer_js.js +3 -3
- package/esm/LineDrawer.js +0 -3
- package/esm/index.js +6 -4
- package/package.json +2 -2
- package/report.html +3 -3
- package/tsparticles.shape.line.js +22 -10
- package/tsparticles.shape.line.min.js +2 -2
- package/types/LineDrawer.d.ts +0 -1
- package/umd/LineDrawer.js +0 -3
- package/umd/index.js +6 -4
- package/117.min.js +0 -2
- package/117.min.js.LICENSE.txt +0 -1
- package/tsparticles.shape.line.min.js.LICENSE.txt +0 -1
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}}}}]);
|
package/browser/LineDrawer.js
CHANGED
package/browser/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export async function loadLineShape(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-
|
|
3
|
-
await engine.register(
|
|
4
|
-
|
|
5
|
-
|
|
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
package/cjs/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export async function loadLineShape(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-
|
|
3
|
-
await engine.register(
|
|
4
|
-
|
|
5
|
-
|
|
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-
|
|
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
|
|
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
|
|
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
package/esm/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export async function loadLineShape(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-
|
|
3
|
-
await engine.register(
|
|
4
|
-
|
|
5
|
-
|
|
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-
|
|
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-
|
|
62
|
+
"@tsparticles/engine": "4.0.0-beta.0"
|
|
63
63
|
},
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|