@tsparticles/path-curl-noise 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/289.min.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunk_tsparticles_path_curl_noise=this.webpackChunk_tsparticles_path_curl_noise||[]).push([[289],{289(e,s,t){t.d(s,{CurlNoiseGenerator:()=>n});var i=t(303),o=t(226);let p={speed:.2,step:250};class n{options;_container;_res;_simplex;constructor(e){this._container=e,this._res=i.Vector.origin;const s=new o.SimplexNoise;this._simplex=s.noise2d,this.options=(0,i.deepExtend)({},p)}generate(e){let s=e.getPosition(),{speed:t,step:o}=this.options,p=s.x/o,n=s.y/o,r=(this._simplex.noise(p,n+.001)-this._simplex.noise(p,n-.001))/(.001*i.double),h=(this._simplex.noise(p+.001,n)-this._simplex.noise(p-.001,n))/(.001*i.double);return e.velocity.x=0,e.velocity.y=0,this._res.x=t*r,this._res.y=-(t*h),this._res}init(){let e=this._container,s=e.actualOptions.particles.move.path.options;this.options.seed=s.seed,this.options.speed=(s.speed??p.speed)*e.retina.pixelRatio,this.options.step=s.step??p.step,this._simplex.seed(this.options.seed??(0,i.getRandom)())}reset(){}update(){}}}}]);
@@ -1,11 +1,17 @@
1
- import { Vector, deepExtend, double, getRandom, } from "@tsparticles/engine";
1
+ import { Vector, deepExtend, double, getRandom } from "@tsparticles/engine";
2
2
  import { SimplexNoise } from "@tsparticles/simplex-noise";
3
3
  const defaultOptions = {
4
4
  speed: 0.2,
5
5
  step: 250,
6
6
  };
7
7
  export class CurlNoiseGenerator {
8
- constructor() {
8
+ options;
9
+ _container;
10
+ _res;
11
+ _simplex;
12
+ constructor(container) {
13
+ this._container = container;
14
+ this._res = Vector.origin;
9
15
  const simplex = new SimplexNoise();
10
16
  this._simplex = simplex.noise2d;
11
17
  this.options = deepExtend({}, defaultOptions);
@@ -14,10 +20,12 @@ export class CurlNoiseGenerator {
14
20
  const pos = particle.getPosition(), { speed, step } = this.options, x = pos.x / step, y = pos.y / step, eps = 0.001, n1a = this._simplex.noise(x, y + eps), n2a = this._simplex.noise(x, y - eps), a = (n1a - n2a) / (double * eps), n1b = this._simplex.noise(x + eps, y), n2b = this._simplex.noise(x - eps, y), b = (n1b - n2b) / (double * eps);
15
21
  particle.velocity.x = 0;
16
22
  particle.velocity.y = 0;
17
- return Vector.create(speed * a, speed * -b);
23
+ this._res.x = speed * a;
24
+ this._res.y = speed * -b;
25
+ return this._res;
18
26
  }
19
- init(container) {
20
- const sourceOptions = container.actualOptions.particles.move.path.options;
27
+ init() {
28
+ const container = this._container, sourceOptions = container.actualOptions.particles.move.path.options;
21
29
  this.options.seed = sourceOptions["seed"];
22
30
  this.options.speed =
23
31
  (sourceOptions["speed"] ?? defaultOptions.speed) * container.retina.pixelRatio;
package/browser/index.js CHANGED
@@ -1,8 +1,12 @@
1
1
  export const curlNoisePathName = "curlNoise";
2
2
  export async function loadCurlNoisePath(engine) {
3
- engine.checkVersion("4.0.0-alpha.8");
3
+ engine.checkVersion("4.0.0-beta.0");
4
4
  await engine.register(async (e) => {
5
- const { CurlNoiseGenerator } = await import("./CurlNoiseGenerator.js");
6
- e.addPathGenerator(curlNoisePathName, new CurlNoiseGenerator());
5
+ const { ensureBaseMoverLoaded } = await import("@tsparticles/plugin-move");
6
+ ensureBaseMoverLoaded(e);
7
+ e.addPathGenerator?.(curlNoisePathName, async (container) => {
8
+ const { CurlNoiseGenerator } = await import("./CurlNoiseGenerator.js");
9
+ return new CurlNoiseGenerator(container);
10
+ });
7
11
  });
8
12
  }
@@ -1,11 +1,17 @@
1
- import { Vector, deepExtend, double, getRandom, } from "@tsparticles/engine";
1
+ import { Vector, deepExtend, double, getRandom } from "@tsparticles/engine";
2
2
  import { SimplexNoise } from "@tsparticles/simplex-noise";
3
3
  const defaultOptions = {
4
4
  speed: 0.2,
5
5
  step: 250,
6
6
  };
7
7
  export class CurlNoiseGenerator {
8
- constructor() {
8
+ options;
9
+ _container;
10
+ _res;
11
+ _simplex;
12
+ constructor(container) {
13
+ this._container = container;
14
+ this._res = Vector.origin;
9
15
  const simplex = new SimplexNoise();
10
16
  this._simplex = simplex.noise2d;
11
17
  this.options = deepExtend({}, defaultOptions);
@@ -14,10 +20,12 @@ export class CurlNoiseGenerator {
14
20
  const pos = particle.getPosition(), { speed, step } = this.options, x = pos.x / step, y = pos.y / step, eps = 0.001, n1a = this._simplex.noise(x, y + eps), n2a = this._simplex.noise(x, y - eps), a = (n1a - n2a) / (double * eps), n1b = this._simplex.noise(x + eps, y), n2b = this._simplex.noise(x - eps, y), b = (n1b - n2b) / (double * eps);
15
21
  particle.velocity.x = 0;
16
22
  particle.velocity.y = 0;
17
- return Vector.create(speed * a, speed * -b);
23
+ this._res.x = speed * a;
24
+ this._res.y = speed * -b;
25
+ return this._res;
18
26
  }
19
- init(container) {
20
- const sourceOptions = container.actualOptions.particles.move.path.options;
27
+ init() {
28
+ const container = this._container, sourceOptions = container.actualOptions.particles.move.path.options;
21
29
  this.options.seed = sourceOptions["seed"];
22
30
  this.options.speed =
23
31
  (sourceOptions["speed"] ?? defaultOptions.speed) * container.retina.pixelRatio;
package/cjs/index.js CHANGED
@@ -1,8 +1,12 @@
1
1
  export const curlNoisePathName = "curlNoise";
2
2
  export async function loadCurlNoisePath(engine) {
3
- engine.checkVersion("4.0.0-alpha.8");
3
+ engine.checkVersion("4.0.0-beta.0");
4
4
  await engine.register(async (e) => {
5
- const { CurlNoiseGenerator } = await import("./CurlNoiseGenerator.js");
6
- e.addPathGenerator(curlNoisePathName, new CurlNoiseGenerator());
5
+ const { ensureBaseMoverLoaded } = await import("@tsparticles/plugin-move");
6
+ ensureBaseMoverLoaded(e);
7
+ e.addPathGenerator?.(curlNoisePathName, async (container) => {
8
+ const { CurlNoiseGenerator } = await import("./CurlNoiseGenerator.js");
9
+ return new CurlNoiseGenerator(container);
10
+ });
7
11
  });
8
12
  }
@@ -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.8
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 */ CurlNoiseGenerator: () => (/* binding */ CurlNoiseGenerator)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_simplex_noise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tsparticles/simplex-noise */ \"@tsparticles/simplex-noise\");\n\n\nconst defaultOptions = {\n speed: 0.2,\n step: 250\n};\nclass CurlNoiseGenerator {\n constructor() {\n const simplex = new _tsparticles_simplex_noise__WEBPACK_IMPORTED_MODULE_1__.SimplexNoise();\n this._simplex = simplex.noise2d;\n this.options = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.deepExtend)({}, defaultOptions);\n }\n generate(particle) {\n const pos = particle.getPosition(),\n {\n speed,\n step\n } = this.options,\n x = pos.x / step,\n y = pos.y / step,\n eps = 0.001,\n n1a = this._simplex.noise(x, y + eps),\n n2a = this._simplex.noise(x, y - eps),\n a = (n1a - n2a) / (_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.double * eps),\n n1b = this._simplex.noise(x + eps, y),\n n2b = this._simplex.noise(x - eps, y),\n b = (n1b - n2b) / (_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.double * eps);\n particle.velocity.x = 0;\n particle.velocity.y = 0;\n return _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.Vector.create(speed * a, speed * -b);\n }\n init(container) {\n const sourceOptions = container.actualOptions.particles.move.path.options;\n this.options.seed = sourceOptions[\"seed\"];\n this.options.speed = (sourceOptions[\"speed\"] ?? defaultOptions.speed) * container.retina.pixelRatio;\n this.options.step = sourceOptions[\"step\"] ?? defaultOptions.step;\n this._simplex.seed(this.options.seed ?? (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)());\n }\n reset() {}\n update() {}\n}\n\n//# sourceURL=webpack://@tsparticles/path-curl-noise/./dist/browser/CurlNoiseGenerator.js?\n}");
26
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CurlNoiseGenerator: () => (/* binding */ CurlNoiseGenerator)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_simplex_noise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tsparticles/simplex-noise */ \"@tsparticles/simplex-noise\");\n\n\nconst defaultOptions = {\n speed: 0.2,\n step: 250\n};\nclass CurlNoiseGenerator {\n options;\n _container;\n _res;\n _simplex;\n constructor(container){\n this._container = container;\n this._res = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.Vector.origin;\n const simplex = new _tsparticles_simplex_noise__WEBPACK_IMPORTED_MODULE_1__.SimplexNoise();\n this._simplex = simplex.noise2d;\n this.options = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.deepExtend)({}, defaultOptions);\n }\n generate(particle) {\n const pos = particle.getPosition(), { speed, step } = this.options, x = pos.x / step, y = pos.y / step, eps = 0.001, n1a = this._simplex.noise(x, y + eps), n2a = this._simplex.noise(x, y - eps), a = (n1a - n2a) / (_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.double * eps), n1b = this._simplex.noise(x + eps, y), n2b = this._simplex.noise(x - eps, y), b = (n1b - n2b) / (_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.double * eps);\n particle.velocity.x = 0;\n particle.velocity.y = 0;\n this._res.x = speed * a;\n this._res.y = speed * -b;\n return this._res;\n }\n init() {\n const container = this._container, sourceOptions = container.actualOptions.particles.move.path.options;\n this.options.seed = sourceOptions[\"seed\"];\n this.options.speed = (sourceOptions[\"speed\"] ?? defaultOptions.speed) * container.retina.pixelRatio;\n this.options.step = sourceOptions[\"step\"] ?? defaultOptions.step;\n this._simplex.seed(this.options.seed ?? (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)());\n }\n reset() {}\n update() {}\n}\n\n\n//# sourceURL=webpack://@tsparticles/path-curl-noise/./dist/browser/CurlNoiseGenerator.js?\n}");
27
27
 
28
28
  /***/ }
29
29
 
@@ -1,11 +1,17 @@
1
- import { Vector, deepExtend, double, getRandom, } from "@tsparticles/engine";
1
+ import { Vector, deepExtend, double, getRandom } from "@tsparticles/engine";
2
2
  import { SimplexNoise } from "@tsparticles/simplex-noise";
3
3
  const defaultOptions = {
4
4
  speed: 0.2,
5
5
  step: 250,
6
6
  };
7
7
  export class CurlNoiseGenerator {
8
- constructor() {
8
+ options;
9
+ _container;
10
+ _res;
11
+ _simplex;
12
+ constructor(container) {
13
+ this._container = container;
14
+ this._res = Vector.origin;
9
15
  const simplex = new SimplexNoise();
10
16
  this._simplex = simplex.noise2d;
11
17
  this.options = deepExtend({}, defaultOptions);
@@ -14,10 +20,12 @@ export class CurlNoiseGenerator {
14
20
  const pos = particle.getPosition(), { speed, step } = this.options, x = pos.x / step, y = pos.y / step, eps = 0.001, n1a = this._simplex.noise(x, y + eps), n2a = this._simplex.noise(x, y - eps), a = (n1a - n2a) / (double * eps), n1b = this._simplex.noise(x + eps, y), n2b = this._simplex.noise(x - eps, y), b = (n1b - n2b) / (double * eps);
15
21
  particle.velocity.x = 0;
16
22
  particle.velocity.y = 0;
17
- return Vector.create(speed * a, speed * -b);
23
+ this._res.x = speed * a;
24
+ this._res.y = speed * -b;
25
+ return this._res;
18
26
  }
19
- init(container) {
20
- const sourceOptions = container.actualOptions.particles.move.path.options;
27
+ init() {
28
+ const container = this._container, sourceOptions = container.actualOptions.particles.move.path.options;
21
29
  this.options.seed = sourceOptions["seed"];
22
30
  this.options.speed =
23
31
  (sourceOptions["speed"] ?? defaultOptions.speed) * container.retina.pixelRatio;
package/esm/index.js CHANGED
@@ -1,8 +1,12 @@
1
1
  export const curlNoisePathName = "curlNoise";
2
2
  export async function loadCurlNoisePath(engine) {
3
- engine.checkVersion("4.0.0-alpha.8");
3
+ engine.checkVersion("4.0.0-beta.0");
4
4
  await engine.register(async (e) => {
5
- const { CurlNoiseGenerator } = await import("./CurlNoiseGenerator.js");
6
- e.addPathGenerator(curlNoisePathName, new CurlNoiseGenerator());
5
+ const { ensureBaseMoverLoaded } = await import("@tsparticles/plugin-move");
6
+ ensureBaseMoverLoaded(e);
7
+ e.addPathGenerator?.(curlNoisePathName, async (container) => {
8
+ const { CurlNoiseGenerator } = await import("./CurlNoiseGenerator.js");
9
+ return new CurlNoiseGenerator(container);
10
+ });
7
11
  });
8
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/path-curl-noise",
3
- "version": "4.0.0-alpha.8",
3
+ "version": "4.0.0-beta.0",
4
4
  "description": "tsParticles curl noise path",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -104,8 +104,9 @@
104
104
  "./package.json": "./package.json"
105
105
  },
106
106
  "dependencies": {
107
- "@tsparticles/engine": "4.0.0-alpha.8",
108
- "@tsparticles/simplex-noise": "4.0.0-alpha.8"
107
+ "@tsparticles/engine": "4.0.0-beta.0",
108
+ "@tsparticles/plugin-move": "4.0.0-beta.0",
109
+ "@tsparticles/simplex-noise": "4.0.0-beta.0"
109
110
  },
110
111
  "type": "module"
111
112
  }
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-curl-noise [23 Jan 2026 at 23:52]</title>
6
+ <title>@tsparticles/path-curl-noise [19 Mar 2026 at 14:02]</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/6P3j7vfS5PNnpNUxhcbO7f7F6v3O4vHK3/DA2u631Ouy0eqXweKJud5wqthfoNMMbLvY8f73+v2dxeR8sNtTmdDx9/zX6PSjyeaCtd1YnNGX2PuQveCGt95Nls42h8dLlM3F4vBtAAAAM3RSTlMAAyOx0/sKBvik8opWGBMOAe3l1snDm2E9LSb06eHcu5JpHbarfHZCN9CBb08zzkdNS0kYaptYAAAFV0lEQVRYw92X51/aYBDHHS2O2qqttVbrqNq9m+TJIAYIShBkWwqIiCgoWvfeq7Z2/s29hyQNyUcR7LveGwVyXy6XH8/9rqxglLfUPLxVduUor3h0rfp2TYvpivk37929TkG037hffoX0+peVtZQc1589rigVUdXS/ABSAyEmGIO/1XfvldSK8vs3OqB6u3m0nxmIrvgB0dj7rr7Y9IbuF68hnfFaiHA/sxqm0wciIG43P60qKv9WXWc1RXGh/mFESFABTSBi0sNAKzqet17eCtOb3kZIDwxEEU0oAIJGYxNBDhBND29e0rtXXbcpuPmED9IhEAAQ/AXEaF8EPmnrrKsv0LvWR3fg5sWDNAFZOgAgaKvZDogHNU9MFwnnYROkc56RD5CjAbQX9Ow4g7upCsvYu55aSI/Nj0H1akgKQEUM94dwK65hYRmFU9MIcH/fqJYOZYcnuJSU/waKDgTOEVaVKhwrTRP5XzgSpAITYzom7UvkhFX5VutmxeNnWDjjswTKTyfgluNDGbUpWissXhF3s7mlSml+czWkg3D0l1nNjGNjz3myOQOa1KM/jOS6ebdbAVTCi4gljHSFrviza7tOgRWcS0MOUX9zdNgag5w7rRqA44Lzw0hr1WqES36dFliSJFlh2rXIae3FFcDDgKdxrUIDePr8jGcSClV1u7A9xeN0ModY/pHMxmR1EzRh8TJiwqsHmKW0l4FCEZI+jHio+JdPPE9qwQtTRxku2D8sIeRL2LnxWSllANCQGOIiqVHAz2ye2JR0DcH+HoxDkaADLjgxjKQ+AwCX/g0+DNgdG0ukYCONAe+dbc2IAc6fwt1ARoDSezNHxV2Cmzwv3O6lDMV55edBGwGK9n1+x2F8EDfAGCxug8MhpsMEcTEAWf3rx2vZhe/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-alpha.8
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").
@@ -16,28 +16,18 @@
16
16
  */
17
17
  (function webpackUniversalModuleDefinition(root, factory) {
18
18
  if(typeof exports === 'object' && typeof module === 'object')
19
- module.exports = factory(require("@tsparticles/engine"), require("@tsparticles/simplex-noise"));
19
+ module.exports = factory(require("@tsparticles/plugin-move"), require("@tsparticles/engine"), require("@tsparticles/simplex-noise"));
20
20
  else if(typeof define === 'function' && define.amd)
21
- define(["@tsparticles/engine", "@tsparticles/simplex-noise"], factory);
21
+ define(["@tsparticles/plugin-move", "@tsparticles/engine", "@tsparticles/simplex-noise"], factory);
22
22
  else {
23
- var a = typeof exports === 'object' ? factory(require("@tsparticles/engine"), require("@tsparticles/simplex-noise")) : factory(root["window"], root["window"]);
23
+ var a = typeof exports === 'object' ? factory(require("@tsparticles/plugin-move"), require("@tsparticles/engine"), require("@tsparticles/simplex-noise")) : factory(root["window"], root["window"], root["window"]);
24
24
  for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
25
25
  }
26
- })(this, (__WEBPACK_EXTERNAL_MODULE__tsparticles_engine__, __WEBPACK_EXTERNAL_MODULE__tsparticles_simplex_noise__) => {
26
+ })(this, (__WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_move__, __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__, __WEBPACK_EXTERNAL_MODULE__tsparticles_simplex_noise__) => {
27
27
  return /******/ (() => { // webpackBootstrap
28
28
  /******/ "use strict";
29
29
  /******/ var __webpack_modules__ = ({
30
30
 
31
- /***/ "./dist/browser/index.js"
32
- /*!*******************************!*\
33
- !*** ./dist/browser/index.js ***!
34
- \*******************************/
35
- (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
36
-
37
- eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ curlNoisePathName: () => (/* binding */ curlNoisePathName),\n/* harmony export */ loadCurlNoisePath: () => (/* binding */ loadCurlNoisePath)\n/* harmony export */ });\nconst curlNoisePathName = \"curlNoise\";\nasync function loadCurlNoisePath(engine) {\n engine.checkVersion(\"4.0.0-alpha.8\");\n await engine.register(async e => {\n const {\n CurlNoiseGenerator\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_CurlNoiseGenerator_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./CurlNoiseGenerator.js */ \"./dist/browser/CurlNoiseGenerator.js\"));\n e.addPathGenerator(curlNoisePathName, new CurlNoiseGenerator());\n });\n}\n\n//# sourceURL=webpack://@tsparticles/path-curl-noise/./dist/browser/index.js?\n}");
38
-
39
- /***/ },
40
-
41
31
  /***/ "@tsparticles/engine"
42
32
  /*!*********************************************************************************************************************************!*\
43
33
  !*** external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"} ***!
@@ -48,6 +38,16 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
48
38
 
49
39
  /***/ },
50
40
 
41
+ /***/ "@tsparticles/plugin-move"
42
+ /*!************************************************************************************************************************************************!*\
43
+ !*** external {"commonjs":"@tsparticles/plugin-move","commonjs2":"@tsparticles/plugin-move","amd":"@tsparticles/plugin-move","root":"window"} ***!
44
+ \************************************************************************************************************************************************/
45
+ (module) {
46
+
47
+ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_move__;
48
+
49
+ /***/ },
50
+
51
51
  /***/ "@tsparticles/simplex-noise"
52
52
  /*!******************************************************************************************************************************************************!*\
53
53
  !*** external {"commonjs":"@tsparticles/simplex-noise","commonjs2":"@tsparticles/simplex-noise","amd":"@tsparticles/simplex-noise","root":"window"} ***!
@@ -56,6 +56,16 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
56
56
 
57
57
  module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_simplex_noise__;
58
58
 
59
+ /***/ },
60
+
61
+ /***/ "./dist/browser/index.js"
62
+ /*!*******************************!*\
63
+ !*** ./dist/browser/index.js ***!
64
+ \*******************************/
65
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
66
+
67
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ curlNoisePathName: () => (/* binding */ curlNoisePathName),\n/* harmony export */ loadCurlNoisePath: () => (/* binding */ loadCurlNoisePath)\n/* harmony export */ });\nconst curlNoisePathName = \"curlNoise\";\nasync function loadCurlNoisePath(engine) {\n engine.checkVersion(\"4.0.0-beta.0\");\n await engine.register(async (e)=>{\n const { ensureBaseMoverLoaded } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-move */ \"@tsparticles/plugin-move\", 19));\n ensureBaseMoverLoaded(e);\n e.addPathGenerator?.(curlNoisePathName, async (container)=>{\n const { CurlNoiseGenerator } = await __webpack_require__.e(/*! import() */ \"dist_browser_CurlNoiseGenerator_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./CurlNoiseGenerator.js */ \"./dist/browser/CurlNoiseGenerator.js\"));\n return new CurlNoiseGenerator(container);\n });\n });\n}\n\n\n//# sourceURL=webpack://@tsparticles/path-curl-noise/./dist/browser/index.js?\n}");
68
+
59
69
  /***/ }
60
70
 
61
71
  /******/ });
@@ -70,12 +80,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_simplex_noise__;
70
80
  /******/ if (cachedModule !== undefined) {
71
81
  /******/ return cachedModule.exports;
72
82
  /******/ }
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
83
  /******/ // Create a new module (and put it into the cache)
80
84
  /******/ var module = __webpack_module_cache__[moduleId] = {
81
85
  /******/ // no module.id needed
@@ -84,6 +88,12 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_simplex_noise__;
84
88
  /******/ };
85
89
  /******/
86
90
  /******/ // Execute the module function
91
+ /******/ if (!(moduleId in __webpack_modules__)) {
92
+ /******/ delete __webpack_module_cache__[moduleId];
93
+ /******/ var e = new Error("Cannot find module '" + moduleId + "'");
94
+ /******/ e.code = 'MODULE_NOT_FOUND';
95
+ /******/ throw e;
96
+ /******/ }
87
97
  /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
88
98
  /******/
89
99
  /******/ // Return the exports of the module
@@ -94,6 +104,36 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_simplex_noise__;
94
104
  /******/ __webpack_require__.m = __webpack_modules__;
95
105
  /******/
96
106
  /************************************************************************/
107
+ /******/ /* webpack/runtime/create fake namespace object */
108
+ /******/ (() => {
109
+ /******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
110
+ /******/ var leafPrototypes;
111
+ /******/ // create a fake namespace object
112
+ /******/ // mode & 1: value is a module id, require it
113
+ /******/ // mode & 2: merge all properties of value into the ns
114
+ /******/ // mode & 4: return value when already ns object
115
+ /******/ // mode & 16: return value when it's Promise-like
116
+ /******/ // mode & 8|1: behave like require
117
+ /******/ __webpack_require__.t = function(value, mode) {
118
+ /******/ if(mode & 1) value = this(value);
119
+ /******/ if(mode & 8) return value;
120
+ /******/ if(typeof value === 'object' && value) {
121
+ /******/ if((mode & 4) && value.__esModule) return value;
122
+ /******/ if((mode & 16) && typeof value.then === 'function') return value;
123
+ /******/ }
124
+ /******/ var ns = Object.create(null);
125
+ /******/ __webpack_require__.r(ns);
126
+ /******/ var def = {};
127
+ /******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
128
+ /******/ for(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) {
129
+ /******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
130
+ /******/ }
131
+ /******/ def['default'] = () => (value);
132
+ /******/ __webpack_require__.d(ns, def);
133
+ /******/ return ns;
134
+ /******/ };
135
+ /******/ })();
136
+ /******/
97
137
  /******/ /* webpack/runtime/define property getters */
98
138
  /******/ (() => {
99
139
  /******/ // define getter functions for harmony exports
@@ -128,6 +168,18 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_simplex_noise__;
128
168
  /******/ };
129
169
  /******/ })();
130
170
  /******/
171
+ /******/ /* webpack/runtime/global */
172
+ /******/ (() => {
173
+ /******/ __webpack_require__.g = (function() {
174
+ /******/ if (typeof globalThis === 'object') return globalThis;
175
+ /******/ try {
176
+ /******/ return this || new Function('return this')();
177
+ /******/ } catch (e) {
178
+ /******/ if (typeof window === 'object') return window;
179
+ /******/ }
180
+ /******/ })();
181
+ /******/ })();
182
+ /******/
131
183
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
132
184
  /******/ (() => {
133
185
  /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
@@ -192,8 +244,8 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_simplex_noise__;
192
244
  /******/ /* webpack/runtime/publicPath */
193
245
  /******/ (() => {
194
246
  /******/ var scriptUrl;
195
- /******/ if (globalThis.importScripts) scriptUrl = globalThis.location + "";
196
- /******/ var document = globalThis.document;
247
+ /******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
248
+ /******/ var document = __webpack_require__.g.document;
197
249
  /******/ if (!scriptUrl && document) {
198
250
  /******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')
199
251
  /******/ scriptUrl = document.currentScript.src;
@@ -1,2 +1,2 @@
1
- /*! For license information please see tsparticles.path.curl.noise.min.js.LICENSE.txt */
2
- !function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r(require("@tsparticles/engine"),require("@tsparticles/simplex-noise"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine","@tsparticles/simplex-noise"],r);else{var t="object"==typeof exports?r(require("@tsparticles/engine"),require("@tsparticles/simplex-noise")):r(e.window,e.window);for(var o in t)("object"==typeof exports?exports:e)[o]=t[o]}}(this,((e,r)=>(()=>{var t,o,i={226(e){e.exports=r},303(r){r.exports=e}},a={};function n(e){var r=a[e];if(void 0!==r)return r.exports;var t=a[e]={exports:{}};return i[e](t,t.exports,n),t.exports}n.m=i,n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((r,t)=>(n.f[t](e,r),r)),[])),n.u=e=>e+".min.js",n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t={},o="@tsparticles/path-curl-noise:",n.l=(e,r,i,a)=>{if(t[e])t[e].push(r);else{var s,l;if(void 0!==i)for(var p=document.getElementsByTagName("script"),c=0;c<p.length;c++){var u=p[c];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==o+i){s=u;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",o+i),s.src=e),t[e]=[r];var d=(r,o)=>{s.onerror=s.onload=null,clearTimeout(f);var i=t[e];if(delete t[e],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((e=>e(o))),r)return r(o)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),l&&document.head.appendChild(s)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var r=globalThis.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{var e={562:0};n.f.j=(r,t)=>{var o=n.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else{var i=new Promise(((t,i)=>o=e[r]=[t,i]));t.push(o[2]=i);var a=n.p+n.u(r),s=new Error;n.l(a,(t=>{if(n.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var i=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;s.message="Loading chunk "+r+" failed.\n("+i+": "+a+")",s.name="ChunkLoadError",s.type=i,s.request=a,o[1](s)}}),"chunk-"+r,r)}};var r=(r,t)=>{var o,i,[a,s,l]=t,p=0;if(a.some((r=>0!==e[r]))){for(o in s)n.o(s,o)&&(n.m[o]=s[o]);if(l)l(n)}for(r&&r(t);p<a.length;p++)i=a[p],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0},t=this.webpackChunk_tsparticles_path_curl_noise=this.webpackChunk_tsparticles_path_curl_noise||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})();var s={};n.r(s),n.d(s,{curlNoisePathName:()=>l,loadCurlNoisePath:()=>p});const l="curlNoise";async function p(e){e.checkVersion("4.0.0-alpha.8"),await e.register((async e=>{const{CurlNoiseGenerator:r}=await n.e(823).then(n.bind(n,823));e.addPathGenerator(l,new r)}))}return s})()));
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/plugin-move"),require("@tsparticles/engine"),require("@tsparticles/simplex-noise"));else if("function"==typeof define&&define.amd)define(["@tsparticles/plugin-move","@tsparticles/engine","@tsparticles/simplex-noise"],t);else{var r="object"==typeof exports?t(require("@tsparticles/plugin-move"),require("@tsparticles/engine"),require("@tsparticles/simplex-noise")):t(e.window,e.window,e.window);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(this,(e,t,r)=>(()=>{"use strict";var o,i,n,a={303(e){e.exports=t},400(t){t.exports=e},226(e){e.exports=r}},s={};function c(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return a[e](r,r.exports,c),r.exports}c.m=a,p=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,t){if(1&t&&(e=this(e)),8&t||"object"==typeof e&&e&&(4&t&&e.__esModule||16&t&&"function"==typeof e.then))return e;var r=Object.create(null);c.r(r);var o={};l=l||[null,p({}),p([]),p(p)];for(var i=2&t&&e;("object"==typeof i||"function"==typeof i)&&!~l.indexOf(i);i=p(i))Object.getOwnPropertyNames(i).forEach(t=>o[t]=()=>e[t]);return o.default=()=>e,c.d(r,o),r},c.d=(e,t)=>{for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce((t,r)=>(c.f[r](e,t),t),[])),c.u=e=>""+e+".min.js",c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u={},c.l=(e,t,r,o)=>{if(u[e])return void u[e].push(t);if(void 0!==r)for(var i,n,a=document.getElementsByTagName("script"),s=0;s<a.length;s++){var l=a[s];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")=="@tsparticles/path-curl-noise:"+r){i=l;break}}i||(n=!0,(i=document.createElement("script")).charset="utf-8",c.nc&&i.setAttribute("nonce",c.nc),i.setAttribute("data-webpack","@tsparticles/path-curl-noise:"+r),i.src=e),u[e]=[t];var p=(t,r)=>{i.onerror=i.onload=null,clearTimeout(f);var o=u[e];if(delete u[e],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach(e=>e(r)),t)return t(r)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=p.bind(null,i.onerror),i.onload=p.bind(null,i.onload),n&&document.head.appendChild(i)},c.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.g.importScripts&&(f=c.g.location+"");var l,p,u,f,d=c.g.document;if(!f&&d&&(d.currentScript&&"SCRIPT"===d.currentScript.tagName.toUpperCase()&&(f=d.currentScript.src),!f)){var h=d.getElementsByTagName("script");if(h.length)for(var b=h.length-1;b>-1&&(!f||!/^http(s?):/.test(f));)f=h[b--].src}if(!f)throw Error("Automatic publicPath is not supported in this browser");c.p=f=f.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o={562:0},c.f.j=(e,t)=>{var r=c.o(o,e)?o[e]:void 0;if(0!==r)if(r)t.push(r[2]);else{var i=new Promise((t,i)=>r=o[e]=[t,i]);t.push(r[2]=i);var n=c.p+c.u(e),a=Error();c.l(n,t=>{if(c.o(o,e)&&(0!==(r=o[e])&&(o[e]=void 0),r)){var i=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;a.message="Loading chunk "+e+` failed.
2
+ (`+i+": "+n+")",a.name="ChunkLoadError",a.type=i,a.request=n,r[1](a)}},"chunk-"+e,e)}},i=(e,t)=>{var r,i,[n,a,s]=t,l=0;if(n.some(e=>0!==o[e])){for(r in a)c.o(a,r)&&(c.m[r]=a[r]);s&&s(c)}for(e&&e(t);l<n.length;l++)i=n[l],c.o(o,i)&&o[i]&&o[i][0](),o[i]=0},(n=this.webpackChunk_tsparticles_path_curl_noise=this.webpackChunk_tsparticles_path_curl_noise||[]).forEach(i.bind(null,0)),n.push=i.bind(null,n.push.bind(n));var m={};c.r(m),c.d(m,{curlNoisePathName:()=>g,loadCurlNoisePath:()=>v});let g="curlNoise";async function v(e){e.checkVersion("4.0.0-beta.0"),await e.register(async e=>{let{ensureBaseMoverLoaded:t}=await Promise.resolve().then(c.t.bind(c,400,19));t(e),e.addPathGenerator?.(g,async e=>{let{CurlNoiseGenerator:t}=await c.e(289).then(c.bind(c,289));return new t(e)})})}return m})());
@@ -1,11 +1,14 @@
1
- import { type Container, type IMovePathGenerator, type Particle, Vector } from "@tsparticles/engine";
1
+ import { type Container, type Particle, Vector } from "@tsparticles/engine";
2
2
  import type { ICurlOptions } from "./ICurlOptions.js";
3
+ import { type IMovePathGenerator } from "@tsparticles/plugin-move";
3
4
  export declare class CurlNoiseGenerator implements IMovePathGenerator {
4
5
  readonly options: ICurlOptions;
6
+ private readonly _container;
7
+ private readonly _res;
5
8
  private readonly _simplex;
6
- constructor();
9
+ constructor(container: Container);
7
10
  generate(particle: Particle): Vector;
8
- init(container: Container): void;
11
+ init(): void;
9
12
  reset(): void;
10
13
  update(): void;
11
14
  }
@@ -17,7 +17,13 @@
17
17
  step: 250,
18
18
  };
19
19
  class CurlNoiseGenerator {
20
- constructor() {
20
+ options;
21
+ _container;
22
+ _res;
23
+ _simplex;
24
+ constructor(container) {
25
+ this._container = container;
26
+ this._res = engine_1.Vector.origin;
21
27
  const simplex = new simplex_noise_1.SimplexNoise();
22
28
  this._simplex = simplex.noise2d;
23
29
  this.options = (0, engine_1.deepExtend)({}, defaultOptions);
@@ -26,10 +32,12 @@
26
32
  const pos = particle.getPosition(), { speed, step } = this.options, x = pos.x / step, y = pos.y / step, eps = 0.001, n1a = this._simplex.noise(x, y + eps), n2a = this._simplex.noise(x, y - eps), a = (n1a - n2a) / (engine_1.double * eps), n1b = this._simplex.noise(x + eps, y), n2b = this._simplex.noise(x - eps, y), b = (n1b - n2b) / (engine_1.double * eps);
27
33
  particle.velocity.x = 0;
28
34
  particle.velocity.y = 0;
29
- return engine_1.Vector.create(speed * a, speed * -b);
35
+ this._res.x = speed * a;
36
+ this._res.y = speed * -b;
37
+ return this._res;
30
38
  }
31
- init(container) {
32
- const sourceOptions = container.actualOptions.particles.move.path.options;
39
+ init() {
40
+ const container = this._container, sourceOptions = container.actualOptions.particles.move.path.options;
33
41
  this.options.seed = sourceOptions["seed"];
34
42
  this.options.speed =
35
43
  (sourceOptions["speed"] ?? defaultOptions.speed) * container.retina.pixelRatio;
package/umd/index.js CHANGED
@@ -47,10 +47,14 @@ var __importStar = (this && this.__importStar) || (function () {
47
47
  exports.loadCurlNoisePath = loadCurlNoisePath;
48
48
  exports.curlNoisePathName = "curlNoise";
49
49
  async function loadCurlNoisePath(engine) {
50
- engine.checkVersion("4.0.0-alpha.8");
50
+ engine.checkVersion("4.0.0-beta.0");
51
51
  await engine.register(async (e) => {
52
- const { CurlNoiseGenerator } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./CurlNoiseGenerator.js"))) : new Promise((resolve_1, reject_1) => { require(["./CurlNoiseGenerator.js"], resolve_1, reject_1); }).then(__importStar));
53
- e.addPathGenerator(exports.curlNoisePathName, new CurlNoiseGenerator());
52
+ const { ensureBaseMoverLoaded } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/plugin-move"))) : new Promise((resolve_1, reject_1) => { require(["@tsparticles/plugin-move"], resolve_1, reject_1); }).then(__importStar));
53
+ ensureBaseMoverLoaded(e);
54
+ e.addPathGenerator?.(exports.curlNoisePathName, async (container) => {
55
+ const { CurlNoiseGenerator } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./CurlNoiseGenerator.js"))) : new Promise((resolve_2, reject_2) => { require(["./CurlNoiseGenerator.js"], resolve_2, reject_2); }).then(__importStar));
56
+ return new CurlNoiseGenerator(container);
57
+ });
54
58
  });
55
59
  }
56
60
  });
package/823.min.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 823.min.js.LICENSE.txt */
2
- (this.webpackChunk_tsparticles_path_curl_noise=this.webpackChunk_tsparticles_path_curl_noise||[]).push([[823],{823(e,s,t){t.d(s,{CurlNoiseGenerator:()=>n});var i=t(303),o=t(226);const p={speed:.2,step:250};class n{constructor(){const e=new o.SimplexNoise;this._simplex=e.noise2d,this.options=(0,i.deepExtend)({},p)}generate(e){const s=e.getPosition(),{speed:t,step:o}=this.options,p=s.x/o,n=s.y/o,h=.001,l=(this._simplex.noise(p,n+h)-this._simplex.noise(p,n-h))/(i.double*h),a=(this._simplex.noise(p+h,n)-this._simplex.noise(p-h,n))/(i.double*h);return e.velocity.x=0,e.velocity.y=0,i.Vector.create(t*l,t*-a)}init(e){const s=e.actualOptions.particles.move.path.options;this.options.seed=s.seed,this.options.speed=(s.speed??p.speed)*e.retina.pixelRatio,this.options.step=s.step??p.step,this._simplex.seed(this.options.seed??(0,i.getRandom)())}reset(){}update(){}}}}]);
@@ -1 +0,0 @@
1
- /*! tsParticles Curl Noise Path v4.0.0-alpha.8 by Matteo Bruni */
@@ -1 +0,0 @@
1
- /*! tsParticles Curl Noise Path v4.0.0-alpha.8 by Matteo Bruni */