@tsparticles/path-levy 4.0.0-beta.0 → 4.0.0-beta.1

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.
@@ -1 +1 @@
1
- "use strict";(this.webpackChunk_tsparticles_path_levy=this.webpackChunk_tsparticles_path_levy||[]).push([[328],{328(t,e,a){a.d(e,{LevyPathGenerator:()=>i});var s=a(303);class i{options;_container;_res;constructor(t){this._container=t,this._res=s.Vector.origin,this.options={alpha:1.5,scale:1,maxStep:10}}generate(t){t.levy??={angle:(0,s.getRandom)()*Math.PI*2,baseSpeed:t.velocity.length};let e=this.options,a=t.levy;a.angle+=((0,s.getRandom)()-.5)*.2;let i=Math.max((0,s.getRandom)(),1e-6),o=(e.scale??1)/Math.pow(i,1/(e.alpha??1.5));void 0!==e.maxStep&&(o=Math.min(o,e.maxStep));let n=a.baseSpeed*o;return t.velocity.x=0,t.velocity.y=0,this._res.length=n,this._res.angle=a.angle,this._res}init(){let t=this._container.actualOptions.particles.move.path.options;this.options.alpha=t.alpha??this.options.alpha,this.options.scale=t.scale??this.options.scale,this.options.maxStep=t.maxStep??this.options.maxStep}reset(t){delete t.levy}update(){}}}}]);
1
+ "use strict";(this.webpackChunk_tsparticles_path_levy=this.webpackChunk_tsparticles_path_levy||[]).push([[844],{844(t,e,a){a.d(e,{LevyPathGenerator:()=>i});var s=a(303);class i{options;_container;_res;constructor(t){this._container=t,this._res=s.Vector.origin,this.options={alpha:1.5,scale:1,maxStep:10}}generate(t){t.levy??={angle:(0,s.getRandom)()*Math.PI*2,baseSpeed:t.velocity.length};let e=this.options,a=t.levy;a.angle+=((0,s.getRandom)()-.5)*.2;let i=Math.max((0,s.getRandom)(),1e-6),o=(e.scale??1)/Math.pow(i,1/(e.alpha??1.5));void 0!==e.maxStep&&(o=Math.min(o,e.maxStep));let n=a.baseSpeed*o;return t.velocity.x=0,t.velocity.y=0,this._res.length=n,this._res.angle=a.angle,this._res}init(){let t=this._container.actualOptions.particles.move.path.options;this.options.alpha=t.alpha??this.options.alpha,this.options.scale=t.scale??this.options.scale,this.options.maxStep=t.maxStep??this.options.maxStep}reset(t){delete t.levy}update(){}}}}]);
package/browser/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  export const levyPathName = "levyPathGenerator";
2
2
  export async function loadLevyPath(engine) {
3
- engine.checkVersion("4.0.0-beta.0");
4
- await engine.register(async (e) => {
3
+ engine.checkVersion("4.0.0-beta.1");
4
+ await engine.pluginManager.register(async (e) => {
5
5
  const { ensureBaseMoverLoaded } = await import("@tsparticles/plugin-move");
6
6
  ensureBaseMoverLoaded(e);
7
- e.addPathGenerator?.(levyPathName, async (container) => {
7
+ e.pluginManager.addPathGenerator?.(levyPathName, async (container) => {
8
8
  const { LevyPathGenerator } = await import("./LevyPathGenerator.js");
9
9
  return new LevyPathGenerator(container);
10
10
  });
package/cjs/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  export const levyPathName = "levyPathGenerator";
2
2
  export async function loadLevyPath(engine) {
3
- engine.checkVersion("4.0.0-beta.0");
4
- await engine.register(async (e) => {
3
+ engine.checkVersion("4.0.0-beta.1");
4
+ await engine.pluginManager.register(async (e) => {
5
5
  const { ensureBaseMoverLoaded } = await import("@tsparticles/plugin-move");
6
6
  ensureBaseMoverLoaded(e);
7
- e.addPathGenerator?.(levyPathName, async (container) => {
7
+ e.pluginManager.addPathGenerator?.(levyPathName, async (container) => {
8
8
  const { LevyPathGenerator } = await import("./LevyPathGenerator.js");
9
9
  return new LevyPathGenerator(container);
10
10
  });
@@ -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-beta.0
7
+ * v4.0.0-beta.1
8
8
  */
9
9
  "use strict";
10
10
  /*
package/esm/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  export const levyPathName = "levyPathGenerator";
2
2
  export async function loadLevyPath(engine) {
3
- engine.checkVersion("4.0.0-beta.0");
4
- await engine.register(async (e) => {
3
+ engine.checkVersion("4.0.0-beta.1");
4
+ await engine.pluginManager.register(async (e) => {
5
5
  const { ensureBaseMoverLoaded } = await import("@tsparticles/plugin-move");
6
6
  ensureBaseMoverLoaded(e);
7
- e.addPathGenerator?.(levyPathName, async (container) => {
7
+ e.pluginManager.addPathGenerator?.(levyPathName, async (container) => {
8
8
  const { LevyPathGenerator } = await import("./LevyPathGenerator.js");
9
9
  return new LevyPathGenerator(container);
10
10
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/path-levy",
3
- "version": "4.0.0-beta.0",
3
+ "version": "4.0.0-beta.1",
4
4
  "description": "tsParticles levy path",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -104,8 +104,8 @@
104
104
  "./package.json": "./package.json"
105
105
  },
106
106
  "dependencies": {
107
- "@tsparticles/engine": "4.0.0-beta.0",
108
- "@tsparticles/plugin-move": "4.0.0-beta.0"
107
+ "@tsparticles/engine": "4.0.0-beta.1",
108
+ "@tsparticles/plugin-move": "4.0.0-beta.1"
109
109
  },
110
110
  "type": "module"
111
111
  }