@tsparticles/path-svg 4.0.0-alpha.4 → 4.0.0-alpha.8
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/376.min.js.LICENSE.txt +1 -1
- package/browser/SVGPathGenerator.js +2 -8
- package/browser/index.js +3 -3
- package/cjs/SVGPathGenerator.js +2 -8
- package/cjs/index.js +3 -3
- package/dist_browser_SVGPathGenerator_js.js +1 -1
- package/esm/SVGPathGenerator.js +2 -8
- package/esm/index.js +3 -3
- package/package.json +2 -2
- package/report.html +3 -3
- package/tsparticles.path.svg.js +2 -2
- package/tsparticles.path.svg.min.js +1 -1
- package/tsparticles.path.svg.min.js.LICENSE.txt +1 -1
- package/types/index.d.ts +1 -1
- package/umd/SVGPathGenerator.js +2 -8
- package/umd/index.js +3 -3
package/376.min.js.LICENSE.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tsParticles SVG Path v4.0.0-alpha.
|
|
1
|
+
/*! tsParticles SVG Path v4.0.0-alpha.8 by Matteo Bruni */
|
|
@@ -65,15 +65,9 @@ export class SVGPathGenerator {
|
|
|
65
65
|
path = this._paths[particle.svgPathIndex];
|
|
66
66
|
const pathElement = path.element, pos = pathElement.getPointAtLength(particle.svgStep), canvasSize = particle.container.canvas.size, offset = getPosition(this._offset, canvasSize), scale = this._scale * pxRatio;
|
|
67
67
|
particle.position.x =
|
|
68
|
-
(pos.x - this._size.width * half) * scale +
|
|
69
|
-
particle.svgInitialPosition.x +
|
|
70
|
-
offset.x +
|
|
71
|
-
particle.svgOffset.width;
|
|
68
|
+
(pos.x - this._size.width * half) * scale + particle.svgInitialPosition.x + offset.x + particle.svgOffset.width;
|
|
72
69
|
particle.position.y =
|
|
73
|
-
(pos.y - this._size.height * half) * scale +
|
|
74
|
-
particle.svgInitialPosition.y +
|
|
75
|
-
offset.y +
|
|
76
|
-
particle.svgOffset.height;
|
|
70
|
+
(pos.y - this._size.height * half) * scale + particle.svgInitialPosition.y + offset.y + particle.svgOffset.height;
|
|
77
71
|
return Vector.origin;
|
|
78
72
|
}
|
|
79
73
|
init(container) {
|
package/browser/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const svgPathName = "svgPathGenerator";
|
|
2
|
-
export function loadSVGPath(engine) {
|
|
3
|
-
engine.checkVersion("4.0.0-alpha.
|
|
4
|
-
engine.register(async (e) => {
|
|
2
|
+
export async function loadSVGPath(engine) {
|
|
3
|
+
engine.checkVersion("4.0.0-alpha.8");
|
|
4
|
+
await engine.register(async (e) => {
|
|
5
5
|
const { SVGPathGenerator } = await import("./SVGPathGenerator.js");
|
|
6
6
|
e.addPathGenerator(svgPathName, new SVGPathGenerator());
|
|
7
7
|
});
|
package/cjs/SVGPathGenerator.js
CHANGED
|
@@ -65,15 +65,9 @@ export class SVGPathGenerator {
|
|
|
65
65
|
path = this._paths[particle.svgPathIndex];
|
|
66
66
|
const pathElement = path.element, pos = pathElement.getPointAtLength(particle.svgStep), canvasSize = particle.container.canvas.size, offset = getPosition(this._offset, canvasSize), scale = this._scale * pxRatio;
|
|
67
67
|
particle.position.x =
|
|
68
|
-
(pos.x - this._size.width * half) * scale +
|
|
69
|
-
particle.svgInitialPosition.x +
|
|
70
|
-
offset.x +
|
|
71
|
-
particle.svgOffset.width;
|
|
68
|
+
(pos.x - this._size.width * half) * scale + particle.svgInitialPosition.x + offset.x + particle.svgOffset.width;
|
|
72
69
|
particle.position.y =
|
|
73
|
-
(pos.y - this._size.height * half) * scale +
|
|
74
|
-
particle.svgInitialPosition.y +
|
|
75
|
-
offset.y +
|
|
76
|
-
particle.svgOffset.height;
|
|
70
|
+
(pos.y - this._size.height * half) * scale + particle.svgInitialPosition.y + offset.y + particle.svgOffset.height;
|
|
77
71
|
return Vector.origin;
|
|
78
72
|
}
|
|
79
73
|
init(container) {
|
package/cjs/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const svgPathName = "svgPathGenerator";
|
|
2
|
-
export function loadSVGPath(engine) {
|
|
3
|
-
engine.checkVersion("4.0.0-alpha.
|
|
4
|
-
engine.register(async (e) => {
|
|
2
|
+
export async function loadSVGPath(engine) {
|
|
3
|
+
engine.checkVersion("4.0.0-alpha.8");
|
|
4
|
+
await engine.register(async (e) => {
|
|
5
5
|
const { SVGPathGenerator } = await import("./SVGPathGenerator.js");
|
|
6
6
|
e.addPathGenerator(svgPathName, new SVGPathGenerator());
|
|
7
7
|
});
|
package/esm/SVGPathGenerator.js
CHANGED
|
@@ -65,15 +65,9 @@ export class SVGPathGenerator {
|
|
|
65
65
|
path = this._paths[particle.svgPathIndex];
|
|
66
66
|
const pathElement = path.element, pos = pathElement.getPointAtLength(particle.svgStep), canvasSize = particle.container.canvas.size, offset = getPosition(this._offset, canvasSize), scale = this._scale * pxRatio;
|
|
67
67
|
particle.position.x =
|
|
68
|
-
(pos.x - this._size.width * half) * scale +
|
|
69
|
-
particle.svgInitialPosition.x +
|
|
70
|
-
offset.x +
|
|
71
|
-
particle.svgOffset.width;
|
|
68
|
+
(pos.x - this._size.width * half) * scale + particle.svgInitialPosition.x + offset.x + particle.svgOffset.width;
|
|
72
69
|
particle.position.y =
|
|
73
|
-
(pos.y - this._size.height * half) * scale +
|
|
74
|
-
particle.svgInitialPosition.y +
|
|
75
|
-
offset.y +
|
|
76
|
-
particle.svgOffset.height;
|
|
70
|
+
(pos.y - this._size.height * half) * scale + particle.svgInitialPosition.y + offset.y + particle.svgOffset.height;
|
|
77
71
|
return Vector.origin;
|
|
78
72
|
}
|
|
79
73
|
init(container) {
|
package/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const svgPathName = "svgPathGenerator";
|
|
2
|
-
export function loadSVGPath(engine) {
|
|
3
|
-
engine.checkVersion("4.0.0-alpha.
|
|
4
|
-
engine.register(async (e) => {
|
|
2
|
+
export async function loadSVGPath(engine) {
|
|
3
|
+
engine.checkVersion("4.0.0-alpha.8");
|
|
4
|
+
await engine.register(async (e) => {
|
|
5
5
|
const { SVGPathGenerator } = await import("./SVGPathGenerator.js");
|
|
6
6
|
e.addPathGenerator(svgPathName, new SVGPathGenerator());
|
|
7
7
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/path-svg",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.8",
|
|
4
4
|
"description": "tsParticles svg path",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"./package.json": "./package.json"
|
|
102
102
|
},
|
|
103
103
|
"dependencies": {
|
|
104
|
-
"@tsparticles/engine": "4.0.0-alpha.
|
|
104
|
+
"@tsparticles/engine": "4.0.0-alpha.8"
|
|
105
105
|
},
|
|
106
106
|
"publishConfig": {
|
|
107
107
|
"access": "public"
|