@tsparticles/path-utils 4.0.0-alpha.8 → 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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/path-utils",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-beta.0",
|
|
4
4
|
"description": "tsParticles path utils library",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"./package.json": "./package.json"
|
|
104
104
|
},
|
|
105
105
|
"dependencies": {
|
|
106
|
-
"@tsparticles/engine": "4.0.0-
|
|
106
|
+
"@tsparticles/engine": "4.0.0-beta.0"
|
|
107
107
|
},
|
|
108
108
|
"type": "module"
|
|
109
109
|
}
|
package/report.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8"/>
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
6
|
-
<title>@tsparticles/path-utils [
|
|
6
|
+
<title>@tsparticles/path-utils [19 Mar 2026 at 13:59]</title>
|
|
7
7
|
<link rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAABrVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+O1foceMD///+J0/qK1Pr7/v8Xdr/9///W8P4UdL7L7P0Scr2r4Pyj3vwad8D5/f/2/f+55f3E6f34+/2H0/ojfMKpzOd0rNgQcb3F3O/j9f7c8v6g3Pz0/P/w+v/q+P7n9v6T1/uQ1vuE0vqLut/y+v+Z2fvt+f+15Pzv9fuc2/vR7v2V2Pvd6/bg9P7I6/285/2y4/yp3/zp8vk8i8kqgMT7/P31+fyv4vxGkcz6/P6/6P3j7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8MhpsMEcTEAWf3rx2vZhe/LAmtIn/6apE6PN0ULKgywD9mmdxbmFl3OvD5AS5fW5zLbv/YHmcsBTjf/afDz3MaZTVCfAP9z6/Bw6ycv8EUBWJIn9zYcoAWWlW9+OzO3vkTy8H+RANLmdrpOuYWdZYEXpo+TlCJrW5EARb7fF+bWdqf3hhyZI1nWJQHgznErZhbjoEsWqi8dQNoE294aldzFurwSABL2XXMf9+H1VQGke9exw5P/AnA5Pv5ngMul7LOvO922iwACu8WkCwLCafvM4CeWPxfA8lNHcWZSoi8EwMAIciKX2Z4SWCMAa3snCZ/G4EA8D6CMLNFsGQhkkz/gQNEBbPCbWsxGUpYVu3z8IyNAknwJkfPMEhLyrdi5RTyUVACkw4GSFRNWJNEW+fgPGwHD8/JxnRuLabN4CGNRkAE23na2+VmEAUmrYymSGjMAYqH84YUIyzgzs3XC7gNgH36Vcc4zKY9o9fgPBXUAiHHwVboBHGLiX6Zcjp1f2wu4tvzZKo0ecPnDtQYDQvJXaBeNzce45Fp28ZQLrEZVuFqgBwOalArKXnW1UzlnSusQKJqKYNuz4tOnI6sZG4zanpemv+7ySU2jbA9h6uhcgpfy6G2PahirDZ6zvq6zDduMVFTKvzw8wgyEdelwY9in3XkEPs3osJuwRQ4qTkfzifndg9Gfc4pdsu82+tTnHZTBa2EAMrqr2t43pguc8tNm7JQVQ2S0ukj2d22dhXYP0/veWtwKrCkNoNimAN5+Xr/oLrxswKbVJjteWrX7eR63o4j9q0GxnaBdWgGA5VStpanIjQmEhV0/nVt5VOFUvix6awJhPcAaTEShgrG+iGyvb5a0Ndb1YGHFPEwoqAinoaykaID1o1pdPNu7XsnCKQ3R+hwWIIhGvORcJUBYXe3Xa3vq/mF/N9V13ugufMkfXn+KHsRD0B8AAAAASUVORK5CYII=" type="image/x-icon" />
|
|
8
8
|
|
|
9
9
|
<script>
|
|
@@ -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
|
/*
|
|
10
10
|
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
@@ -34,7 +34,7 @@ return /******/ (() => { // webpackBootstrap
|
|
|
34
34
|
\*************************************/
|
|
35
35
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
36
36
|
|
|
37
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SegmentType: () => (/* binding */ SegmentType)\n/* harmony export */ });\nvar SegmentType;\n(function
|
|
37
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SegmentType: () => (/* binding */ SegmentType)\n/* harmony export */ });\nvar SegmentType;\n(function(SegmentType) {\n SegmentType[\"move\"] = \"move\";\n SegmentType[\"line\"] = \"line\";\n SegmentType[\"bezier\"] = \"bezier\";\n SegmentType[\"quadratic\"] = \"quadratic\";\n SegmentType[\"arc\"] = \"arc\";\n SegmentType[\"ellipse\"] = \"ellipse\";\n})(SegmentType || (SegmentType = {}));\n\n\n//# sourceURL=webpack://@tsparticles/path-utils/./dist/browser/SegmentType.js?\n}");
|
|
38
38
|
|
|
39
39
|
/***/ },
|
|
40
40
|
|
|
@@ -44,7 +44,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
44
44
|
\*******************************/
|
|
45
45
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
46
46
|
|
|
47
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ drawPath: () => (/* binding */ drawPath)\n/* harmony export */ });\n/* harmony import */ var _SegmentType_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SegmentType.js */ \"./dist/browser/SegmentType.js\");\n\nconst firstIndex = 0
|
|
47
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ drawPath: () => (/* binding */ drawPath)\n/* harmony export */ });\n/* harmony import */ var _SegmentType_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SegmentType.js */ \"./dist/browser/SegmentType.js\");\n\nconst firstIndex = 0, index2 = 1, index3 = 2, index4 = 3;\nfunction drawPath(ctx, radius, path) {\n const firstSegment = path.segments[firstIndex];\n if (!firstSegment) {\n return;\n }\n const firstValue = firstSegment.values[firstIndex];\n if (!firstValue) {\n return;\n }\n ctx.moveTo(firstValue.x * radius, firstValue.y * radius);\n for (const segment of path.segments){\n const value = segment.values[firstIndex];\n if (!value) {\n continue;\n }\n const segmentValue2 = segment.values[index2], segmentValue3 = segment.values[index3], segmentValue4 = segment.values[index4];\n switch(segment.type){\n case _SegmentType_js__WEBPACK_IMPORTED_MODULE_0__.SegmentType.move:\n ctx.moveTo(value.x * radius, value.y * radius);\n break;\n case _SegmentType_js__WEBPACK_IMPORTED_MODULE_0__.SegmentType.line:\n ctx.lineTo(value.x * radius, value.y * radius);\n break;\n case _SegmentType_js__WEBPACK_IMPORTED_MODULE_0__.SegmentType.bezier:\n if (!segmentValue2 || !segmentValue3 || !segmentValue4) {\n continue;\n }\n ctx.bezierCurveTo(segmentValue2.x * radius, segmentValue2.y * radius, segmentValue3.x * radius, segmentValue3.y * radius, segmentValue4.x * radius, segmentValue4.y * radius);\n break;\n case _SegmentType_js__WEBPACK_IMPORTED_MODULE_0__.SegmentType.quadratic:\n if (!segmentValue2 || !segmentValue3) {\n continue;\n }\n ctx.quadraticCurveTo(segmentValue2.x * radius, segmentValue2.y * radius, segmentValue3.x * radius, segmentValue3.y * radius);\n break;\n case _SegmentType_js__WEBPACK_IMPORTED_MODULE_0__.SegmentType.arc:\n if (!segmentValue2 || !segmentValue3) {\n continue;\n }\n ctx.arc(value.x * radius, value.y * radius, segmentValue2.x * radius, segmentValue3.x, segmentValue3.y);\n break;\n case _SegmentType_js__WEBPACK_IMPORTED_MODULE_0__.SegmentType.ellipse:\n if (!segmentValue2 || !segmentValue3 || !segmentValue4) {\n continue;\n }\n ctx.ellipse(value.x * radius, value.y * radius, segmentValue2.x * radius, segmentValue2.y * radius, segmentValue3.x, segmentValue4.x, segmentValue4.y);\n break;\n }\n }\n if (!path.half) {\n return;\n }\n const lengthOffset = 1, minLength = 0;\n for(let i = path.segments.length - lengthOffset; i >= minLength; i--){\n const segment = path.segments[i];\n if (!segment) {\n continue;\n }\n const value = segment.values[firstIndex], index2 = 1, index3 = 2, segmentValue2 = segment.values[index2], segmentValue3 = segment.values[index3];\n switch(segment.type){\n case _SegmentType_js__WEBPACK_IMPORTED_MODULE_0__.SegmentType.line:\n if (!value) {\n break;\n }\n ctx.lineTo(value.x * -radius, value.y * radius);\n break;\n case _SegmentType_js__WEBPACK_IMPORTED_MODULE_0__.SegmentType.bezier:\n if (!value || !segmentValue2 || !segmentValue3) {\n break;\n }\n ctx.bezierCurveTo(-segmentValue3.x * radius, segmentValue3.y * radius, -segmentValue2.x * radius, segmentValue2.y * radius, -value.x * radius, value.y * radius);\n break;\n case _SegmentType_js__WEBPACK_IMPORTED_MODULE_0__.SegmentType.quadratic:\n if (!segmentValue2 || !segmentValue3) {\n break;\n }\n ctx.quadraticCurveTo(-segmentValue2.x * radius, segmentValue2.y * radius, -segmentValue3.x * radius, segmentValue3.y * radius);\n break;\n case _SegmentType_js__WEBPACK_IMPORTED_MODULE_0__.SegmentType.arc:\n case _SegmentType_js__WEBPACK_IMPORTED_MODULE_0__.SegmentType.ellipse:\n default:\n break;\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/path-utils/./dist/browser/Utils.js?\n}");
|
|
48
48
|
|
|
49
49
|
/***/ },
|
|
50
50
|
|
|
@@ -54,7 +54,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
54
54
|
\*******************************/
|
|
55
55
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
56
56
|
|
|
57
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SegmentType: () => (/* reexport safe */ _SegmentType_js__WEBPACK_IMPORTED_MODULE_0__.SegmentType),\n/* harmony export */ drawPath: () => (/* reexport safe */ _Utils_js__WEBPACK_IMPORTED_MODULE_1__.drawPath)\n/* harmony export */ });\n/* harmony import */ var _SegmentType_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SegmentType.js */ \"./dist/browser/SegmentType.js\");\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Utils.js */ \"./dist/browser/Utils.js\");\n\n\n\n//# sourceURL=webpack://@tsparticles/path-utils/./dist/browser/index.js?\n}");
|
|
57
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SegmentType: () => (/* reexport safe */ _SegmentType_js__WEBPACK_IMPORTED_MODULE_0__.SegmentType),\n/* harmony export */ drawPath: () => (/* reexport safe */ _Utils_js__WEBPACK_IMPORTED_MODULE_1__.drawPath)\n/* harmony export */ });\n/* harmony import */ var _SegmentType_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SegmentType.js */ \"./dist/browser/SegmentType.js\");\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Utils.js */ \"./dist/browser/Utils.js\");\n\n\n\n\n//# sourceURL=webpack://@tsparticles/path-utils/./dist/browser/index.js?\n}");
|
|
58
58
|
|
|
59
59
|
/***/ }
|
|
60
60
|
|
|
@@ -70,12 +70,6 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
70
70
|
/******/ if (cachedModule !== undefined) {
|
|
71
71
|
/******/ return cachedModule.exports;
|
|
72
72
|
/******/ }
|
|
73
|
-
/******/ // Check if module exists (development only)
|
|
74
|
-
/******/ if (__webpack_modules__[moduleId] === undefined) {
|
|
75
|
-
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
76
|
-
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
77
|
-
/******/ throw e;
|
|
78
|
-
/******/ }
|
|
79
73
|
/******/ // Create a new module (and put it into the cache)
|
|
80
74
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
81
75
|
/******/ // no module.id needed
|
|
@@ -84,6 +78,12 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
84
78
|
/******/ };
|
|
85
79
|
/******/
|
|
86
80
|
/******/ // Execute the module function
|
|
81
|
+
/******/ if (!(moduleId in __webpack_modules__)) {
|
|
82
|
+
/******/ delete __webpack_module_cache__[moduleId];
|
|
83
|
+
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
84
|
+
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
85
|
+
/******/ throw e;
|
|
86
|
+
/******/ }
|
|
87
87
|
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
88
88
|
/******/
|
|
89
89
|
/******/ // Return the exports of the module
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(this,(()=>(()=>{var e,t={d:(e,o)=>{for(var r in o)t.o(o,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};t.r(o),t.d(o,{SegmentType:()=>e,drawPath:()=>s}),function(e){e.move="move",e.line="line",e.bezier="bezier",e.quadratic="quadratic",e.arc="arc",e.ellipse="ellipse"}(e||(e={}));const r=0,a=1,i=2,n=3;function s(t,o,s){const c=s.segments[r];if(!c)return;const l=c.values[r];if(!l)return;t.moveTo(l.x*o,l.y*o);for(const c of s.segments){const s=c.values[r];if(!s)continue;const l=c.values[a],u=c.values[i],f=c.values[n];switch(c.type){case e.move:t.moveTo(s.x*o,s.y*o);break;case e.line:t.lineTo(s.x*o,s.y*o);break;case e.bezier:if(!l||!u||!f)continue;t.bezierCurveTo(l.x*o,l.y*o,u.x*o,u.y*o,f.x*o,f.y*o);break;case e.quadratic:if(!l||!u)continue;t.quadraticCurveTo(l.x*o,l.y*o,u.x*o,u.y*o);break;case e.arc:if(!l||!u)continue;t.arc(s.x*o,s.y*o,l.x*o,u.x,u.y);break;case e.ellipse:if(!l||!u||!f)continue;t.ellipse(s.x*o,s.y*o,l.x*o,l.y*o,u.x,f.x,f.y)}}if(!s.half)return;for(let a=s.segments.length-1;a>=0;a--){const i=s.segments[a];if(!i)continue;const n=i.values[r],c=1,l=2,u=i.values[c],f=i.values[l];switch(i.type){case e.line:if(!n)break;t.lineTo(n.x*-o,n.y*o);break;case e.bezier:if(!n||!u||!f)break;t.bezierCurveTo(-f.x*o,f.y*o,-u.x*o,u.y*o,-n.x*o,n.y*o);break;case e.quadratic:if(!u||!f)break;t.quadraticCurveTo(-u.x*o,u.y*o,-f.x*o,f.y*o);case e.arc:case e.ellipse:}}}return o})()));
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var a in r)("object"==typeof exports?exports:e)[a]=r[a]}}(this,()=>(()=>{"use strict";var e,t,r={};r.d=(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};function i(e,r,a){let i=a.segments[0];if(!i)return;let o=i.values[0];if(o){for(let i of(e.moveTo(o.x*r,o.y*r),a.segments)){let a=i.values[0];if(!a)continue;let o=i.values[1],l=i.values[2],s=i.values[3];switch(i.type){case t.move:e.moveTo(a.x*r,a.y*r);break;case t.line:e.lineTo(a.x*r,a.y*r);break;case t.bezier:if(!o||!l||!s)continue;e.bezierCurveTo(o.x*r,o.y*r,l.x*r,l.y*r,s.x*r,s.y*r);break;case t.quadratic:if(!o||!l)continue;e.quadraticCurveTo(o.x*r,o.y*r,l.x*r,l.y*r);break;case t.arc:if(!o||!l)continue;e.arc(a.x*r,a.y*r,o.x*r,l.x,l.y);break;case t.ellipse:if(!o||!l||!s)continue;e.ellipse(a.x*r,a.y*r,o.x*r,o.y*r,l.x,s.x,s.y)}}if(a.half)for(let i=a.segments.length-1;i>=0;i--){let o=a.segments[i];if(!o)continue;let l=o.values[0],s=o.values[1],n=o.values[2];switch(o.type){case t.line:if(!l)break;e.lineTo(-(l.x*r),l.y*r);break;case t.bezier:if(!l||!s||!n)break;e.bezierCurveTo(-n.x*r,n.y*r,-s.x*r,s.y*r,-l.x*r,l.y*r);break;case t.quadratic:if(!s||!n)break;e.quadraticCurveTo(-s.x*r,s.y*r,-n.x*r,n.y*r);case t.arc:case t.ellipse:}}}}return r.r(a),r.d(a,{SegmentType:()=>t,drawPath:()=>i}),(e=t||(t={})).move="move",e.line="line",e.bezier="bezier",e.quadratic="quadratic",e.arc="arc",e.ellipse="ellipse",a})());
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Path Utils v4.0.0-alpha.8 by Matteo Bruni */
|