tsparticles 1.37.1 → 1.37.2

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.
@@ -36,6 +36,7 @@ export declare class Container {
36
36
  readonly pathGenerator: IMovePathGenerator;
37
37
  private _options;
38
38
  private _sourceOptions;
39
+ private readonly _initialSourceOptions;
39
40
  private paused;
40
41
  private firstStart;
41
42
  private currentTheme?;
package/Core/Container.js CHANGED
@@ -22,6 +22,7 @@ class Container {
22
22
  this.zLayers = 100;
23
23
  this.pageHidden = false;
24
24
  this._sourceOptions = sourceOptions;
25
+ this._initialSourceOptions = sourceOptions;
25
26
  this.retina = new Retina_1.Retina(this);
26
27
  this.canvas = new Canvas_1.Canvas(this);
27
28
  this.particles = new Particles_1.Particles(this);
@@ -321,6 +322,7 @@ class Container {
321
322
  this.drawers.set(type, drawer);
322
323
  }
323
324
  }
325
+ this._options.load(this._initialSourceOptions);
324
326
  this._options.load(this._sourceOptions);
325
327
  this.actualOptions = new Options_1.Options();
326
328
  this.actualOptions.load(this._options);
@@ -66,6 +66,7 @@ export declare class Container {
66
66
  readonly pathGenerator: IMovePathGenerator;
67
67
  private _options;
68
68
  private _sourceOptions;
69
+ private readonly _initialSourceOptions;
69
70
  private paused;
70
71
  private firstStart;
71
72
  private currentTheme?;
@@ -35,6 +35,7 @@ export class Container {
35
35
  this.zLayers = 100;
36
36
  this.pageHidden = false;
37
37
  this._sourceOptions = sourceOptions;
38
+ this._initialSourceOptions = sourceOptions;
38
39
  this.retina = new Retina(this);
39
40
  this.canvas = new Canvas(this);
40
41
  this.particles = new Particles(this);
@@ -400,6 +401,7 @@ export class Container {
400
401
  }
401
402
  }
402
403
  /* options settings */
404
+ this._options.load(this._initialSourceOptions);
403
405
  this._options.load(this._sourceOptions);
404
406
  this.actualOptions = new Options();
405
407
  this.actualOptions.load(this._options);
@@ -32,7 +32,9 @@ export async function loadPolygonMaskPlugin(tsParticles) {
32
32
  if (!isSsr() && !window.SVGPathSeg) {
33
33
  await import(
34
34
  /* webpackChunkName: "tsparticles.pathseg" */
35
- /* webpackMode: "weak" */
35
+ /* webpackMode: "lazy" */
36
+ /* webpackPrefetch: true */
37
+ /* webpackPreload: true */
36
38
  "./pathseg");
37
39
  }
38
40
  const plugin = new Plugin();
@@ -36,6 +36,7 @@ export declare class Container {
36
36
  readonly pathGenerator: IMovePathGenerator;
37
37
  private _options;
38
38
  private _sourceOptions;
39
+ private readonly _initialSourceOptions;
39
40
  private paused;
40
41
  private firstStart;
41
42
  private currentTheme?;
@@ -19,6 +19,7 @@ export class Container {
19
19
  this.zLayers = 100;
20
20
  this.pageHidden = false;
21
21
  this._sourceOptions = sourceOptions;
22
+ this._initialSourceOptions = sourceOptions;
22
23
  this.retina = new Retina(this);
23
24
  this.canvas = new Canvas(this);
24
25
  this.particles = new Particles(this);
@@ -318,6 +319,7 @@ export class Container {
318
319
  this.drawers.set(type, drawer);
319
320
  }
320
321
  }
322
+ this._options.load(this._initialSourceOptions);
321
323
  this._options.load(this._sourceOptions);
322
324
  this.actualOptions = new Options();
323
325
  this.actualOptions.load(this._options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsparticles",
3
- "version": "1.37.1",
3
+ "version": "1.37.2",
4
4
  "description": "Easily create highly customizable particle animations and use them as animated backgrounds for your website. Ready to use components available also for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.",
5
5
  "homepage": "https://particles.js.org/",
6
6
  "scripts": {