@tsparticles/path-zig-zag 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.
package/714.min.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunk_tsparticles_path_zig_zag=this.webpackChunk_tsparticles_path_zig_zag||[]).push([[714],{333(t,e,i){i.d(e,{ZigZagPathGenerator:()=>h});var a=i(303);let n=Math.PI*a.half,s={waveHeight:{min:0,max:3},waveLength:{min:0,max:5}};class h{options;_container;_res;constructor(t){this._container=t,this._res=a.Vector.origin,this.options=(0,a.deepExtend)({},s)}generate(t,e){let{options:i}=this;t.zigzag??={counter:(0,a.getRandom)(),waveHeight:(0,a.getRangeValue)(i.waveHeight),waveLength:(0,a.getRangeValue)(i.waveLength)};let s=.5/t.zigzag.waveLength*e.factor;t.zigzag.counter+=s;let h=t.zigzag.waveHeight*Math.sin(t.zigzag.counter);return t.position.x+=h*Math.cos(t.velocity.angle+n),t.position.y+=h*Math.sin(t.velocity.angle+n),this._res.x=0,this._res.y=0,this._res}init(){let t=this._container.actualOptions.particles.move.path.options;this.options.waveLength=t.waveLength??this.options.waveLength,this.options.waveHeight=t.waveHeight??this.options.waveHeight}reset(){}update(){}}}}]);
package/browser/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  export const zigZagPathName = "zigZagPathGenerator";
2
2
  export async function loadZigZagPath(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?.(zigZagPathName, async (container) => {
7
+ e.pluginManager.addPathGenerator?.(zigZagPathName, async (container) => {
8
8
  const { ZigZagPathGenerator } = await import("./ZigZagPathGenerator.js");
9
9
  return new ZigZagPathGenerator(container);
10
10
  });
package/cjs/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  export const zigZagPathName = "zigZagPathGenerator";
2
2
  export async function loadZigZagPath(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?.(zigZagPathName, async (container) => {
7
+ e.pluginManager.addPathGenerator?.(zigZagPathName, async (container) => {
8
8
  const { ZigZagPathGenerator } = await import("./ZigZagPathGenerator.js");
9
9
  return new ZigZagPathGenerator(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 zigZagPathName = "zigZagPathGenerator";
2
2
  export async function loadZigZagPath(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?.(zigZagPathName, async (container) => {
7
+ e.pluginManager.addPathGenerator?.(zigZagPathName, async (container) => {
8
8
  const { ZigZagPathGenerator } = await import("./ZigZagPathGenerator.js");
9
9
  return new ZigZagPathGenerator(container);
10
10
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/path-zig-zag",
3
- "version": "4.0.0-beta.0",
3
+ "version": "4.0.0-beta.1",
4
4
  "description": "tsParticles zig zag path",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -101,8 +101,8 @@
101
101
  "./package.json": "./package.json"
102
102
  },
103
103
  "dependencies": {
104
- "@tsparticles/engine": "4.0.0-beta.0",
105
- "@tsparticles/plugin-move": "4.0.0-beta.0"
104
+ "@tsparticles/engine": "4.0.0-beta.1",
105
+ "@tsparticles/plugin-move": "4.0.0-beta.1"
106
106
  },
107
107
  "publishConfig": {
108
108
  "access": "public"