@tsparticles/plugin-infection 3.0.0-beta.0 → 3.0.0-beta.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.
@@ -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
- * v3.0.0-beta.0
7
+ * v3.0.0-beta.2
8
8
  */
9
9
  (function webpackUniversalModuleDefinition(root, factory) {
10
10
  if(typeof exports === 'object' && typeof module === 'object')
@@ -1 +1 @@
1
- /*! tsParticles Infection Plugin v3.0.0-beta.0 by Matteo Bruni */
1
+ /*! tsParticles Infection Plugin v3.0.0-beta.2 by Matteo Bruni */
@@ -1,4 +1,4 @@
1
- import type { InfectableContainer, InfectableParticle } from "./Types";
1
+ import type { InfectableContainer, InfectableParticle } from "./Types.js";
2
2
  export declare class Infecter {
3
3
  private readonly _container;
4
4
  constructor(container: InfectableContainer);
@@ -1,5 +1,5 @@
1
1
  import { type IContainerPlugin, type IOptionsColor, type Particle } from "@tsparticles/engine";
2
- import type { InfectableContainer, InfectableParticle } from "./Types";
2
+ import type { InfectableContainer, InfectableParticle } from "./Types.js";
3
3
  export declare class InfectionInstance implements IContainerPlugin {
4
4
  private readonly _container;
5
5
  constructor(container: InfectableContainer);
@@ -1,6 +1,6 @@
1
1
  import type { IOptionLoader, RecursivePartial } from "@tsparticles/engine";
2
- import type { IInfection } from "../Interfaces/IInfection";
3
- import { InfectionStage } from "./InfectionStage";
2
+ import type { IInfection } from "../Interfaces/IInfection.js";
3
+ import { InfectionStage } from "./InfectionStage.js";
4
4
  export declare class Infection implements IInfection, IOptionLoader<IInfection> {
5
5
  cure: boolean;
6
6
  delay: number;
@@ -1,5 +1,5 @@
1
1
  import { type IOptionLoader, OptionsColor, type RecursivePartial } from "@tsparticles/engine";
2
- import type { IInfectionStage } from "../Interfaces/IInfectionStage";
2
+ import type { IInfectionStage } from "../Interfaces/IInfectionStage.js";
3
3
  export declare class InfectionStage implements IInfectionStage, IOptionLoader<IInfectionStage> {
4
4
  color: OptionsColor;
5
5
  duration?: number;
@@ -1,4 +1,4 @@
1
- import type { IInfectionStage } from "./IInfectionStage";
1
+ import type { IInfectionStage } from "./IInfectionStage.js";
2
2
  export interface IInfection {
3
3
  cure: boolean;
4
4
  delay: number;
@@ -1,5 +1,5 @@
1
1
  import { type IDelta, ParticlesInteractorBase } from "@tsparticles/engine";
2
- import type { InfectableContainer, InfectableParticle } from "./Types";
2
+ import type { InfectableContainer, InfectableParticle } from "./Types.js";
3
3
  export declare class ParticlesInfecter extends ParticlesInteractorBase<InfectableContainer> {
4
4
  constructor(container: InfectableContainer);
5
5
  clear(): void;
package/types/Types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { Container, IOptions, IParticle, Options, Particle } from "@tsparticles/engine";
2
- import type { IInfection } from "./Options/Interfaces/IInfection";
3
- import type { Infecter } from "./Infecter";
4
- import type { Infection } from "./Options/Classes/Infection";
2
+ import type { IInfection } from "./Options/Interfaces/IInfection.js";
3
+ import type { Infecter } from "./Infecter.js";
4
+ import type { Infection } from "./Options/Classes/Infection.js";
5
5
  export interface IParticleInfection {
6
6
  delay?: number;
7
7
  delayStage?: number;
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import type { Engine } from "@tsparticles/engine";
2
2
  export declare function loadInfectionPlugin(engine: Engine, refresh?: boolean): Promise<void>;
3
- export * from "./Options/Interfaces/IInfection";
4
- export * from "./Options/Interfaces/IInfectionStage";
3
+ export * from "./Options/Interfaces/IInfection.js";
4
+ export * from "./Options/Interfaces/IInfectionStage.js";
@@ -4,18 +4,18 @@
4
4
  if (v !== undefined) module.exports = v;
5
5
  }
6
6
  else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "@tsparticles/engine", "./Infecter"], factory);
7
+ define(["require", "exports", "@tsparticles/engine", "./Infecter.js"], factory);
8
8
  }
9
9
  })(function (require, exports) {
10
10
  "use strict";
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.InfectionInstance = void 0;
13
13
  const engine_1 = require("@tsparticles/engine");
14
- const Infecter_1 = require("./Infecter");
14
+ const Infecter_js_1 = require("./Infecter.js");
15
15
  class InfectionInstance {
16
16
  constructor(container) {
17
17
  this._container = container;
18
- this._container.infecter = new Infecter_1.Infecter(this._container);
18
+ this._container.infecter = new Infecter_js_1.Infecter(this._container);
19
19
  }
20
20
  particleFillColor(particle) {
21
21
  const options = this._container.actualOptions;
@@ -4,13 +4,13 @@
4
4
  if (v !== undefined) module.exports = v;
5
5
  }
6
6
  else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "./InfectionStage"], factory);
7
+ define(["require", "exports", "./InfectionStage.js"], factory);
8
8
  }
9
9
  })(function (require, exports) {
10
10
  "use strict";
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Infection = void 0;
13
- const InfectionStage_1 = require("./InfectionStage");
13
+ const InfectionStage_js_1 = require("./InfectionStage.js");
14
14
  class Infection {
15
15
  constructor() {
16
16
  this.cure = false;
@@ -39,7 +39,7 @@
39
39
  return;
40
40
  }
41
41
  this.stages = data.stages.map((t) => {
42
- const s = new InfectionStage_1.InfectionStage();
42
+ const s = new InfectionStage_js_1.InfectionStage();
43
43
  s.load(t);
44
44
  return s;
45
45
  });
package/umd/index.js CHANGED
@@ -18,21 +18,21 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18
18
  if (v !== undefined) module.exports = v;
19
19
  }
20
20
  else if (typeof define === "function" && define.amd) {
21
- define(["require", "exports", "./Options/Classes/Infection", "./InfectionInstance", "./ParticlesInfecter", "./Options/Interfaces/IInfection", "./Options/Interfaces/IInfectionStage"], factory);
21
+ define(["require", "exports", "./Options/Classes/Infection.js", "./InfectionInstance.js", "./ParticlesInfecter.js", "./Options/Interfaces/IInfection.js", "./Options/Interfaces/IInfectionStage.js"], factory);
22
22
  }
23
23
  })(function (require, exports) {
24
24
  "use strict";
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.loadInfectionPlugin = void 0;
27
- const Infection_1 = require("./Options/Classes/Infection");
28
- const InfectionInstance_1 = require("./InfectionInstance");
29
- const ParticlesInfecter_1 = require("./ParticlesInfecter");
27
+ const Infection_js_1 = require("./Options/Classes/Infection.js");
28
+ const InfectionInstance_js_1 = require("./InfectionInstance.js");
29
+ const ParticlesInfecter_js_1 = require("./ParticlesInfecter.js");
30
30
  class InfectionPlugin {
31
31
  constructor() {
32
32
  this.id = "infection";
33
33
  }
34
34
  getPlugin(container) {
35
- return new InfectionInstance_1.InfectionInstance(container);
35
+ return new InfectionInstance_js_1.InfectionInstance(container);
36
36
  }
37
37
  loadOptions(options, source) {
38
38
  if (!this.needsPlugin(options) && !this.needsPlugin(source)) {
@@ -40,7 +40,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
40
40
  }
41
41
  let infectionOptions = options.infection;
42
42
  if (infectionOptions?.load === undefined) {
43
- options.infection = infectionOptions = new Infection_1.Infection();
43
+ options.infection = infectionOptions = new Infection_js_1.Infection();
44
44
  }
45
45
  infectionOptions.load(source?.infection);
46
46
  }
@@ -51,9 +51,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
51
51
  async function loadInfectionPlugin(engine, refresh = true) {
52
52
  const plugin = new InfectionPlugin();
53
53
  await engine.addPlugin(plugin, refresh);
54
- await engine.addInteractor("particlesInfection", (container) => new ParticlesInfecter_1.ParticlesInfecter(container), refresh);
54
+ await engine.addInteractor("particlesInfection", (container) => new ParticlesInfecter_js_1.ParticlesInfecter(container), refresh);
55
55
  }
56
56
  exports.loadInfectionPlugin = loadInfectionPlugin;
57
- __exportStar(require("./Options/Interfaces/IInfection"), exports);
58
- __exportStar(require("./Options/Interfaces/IInfectionStage"), exports);
57
+ __exportStar(require("./Options/Interfaces/IInfection.js"), exports);
58
+ __exportStar(require("./Options/Interfaces/IInfectionStage.js"), exports);
59
59
  });