@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.
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![npmjs](https://badge.fury.io/js/@tsparticles/plugin-infection.svg)](https://www.npmjs.com/package/@tsparticles/plugin-infection)
7
7
  [![npmjs](https://img.shields.io/npm/dt/@tsparticles/plugin-infection)](https://www.npmjs.com/package/@tsparticles/plugin-infection) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni)
8
8
 
9
- [tsParticles](https://github.com/matteobruni/tsparticles) plugin for particles infection simulation effect.
9
+ [tsParticles](https://github.com/tsparticles/tsparticles) plugin for particles infection simulation effect.
10
10
 
11
11
  ## How to use it
12
12
 
@@ -1,5 +1,5 @@
1
1
  import { itemFromArray } from "@tsparticles/engine";
2
- import { Infecter } from "./Infecter";
2
+ import { Infecter } from "./Infecter.js";
3
3
  export class InfectionInstance {
4
4
  constructor(container) {
5
5
  this._container = container;
@@ -1,4 +1,4 @@
1
- import { InfectionStage } from "./InfectionStage";
1
+ import { InfectionStage } from "./InfectionStage.js";
2
2
  export class Infection {
3
3
  constructor() {
4
4
  this.cure = false;
package/browser/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { Infection } from "./Options/Classes/Infection";
2
- import { InfectionInstance } from "./InfectionInstance";
3
- import { ParticlesInfecter } from "./ParticlesInfecter";
1
+ import { Infection } from "./Options/Classes/Infection.js";
2
+ import { InfectionInstance } from "./InfectionInstance.js";
3
+ import { ParticlesInfecter } from "./ParticlesInfecter.js";
4
4
  class InfectionPlugin {
5
5
  constructor() {
6
6
  this.id = "infection";
@@ -27,5 +27,5 @@ export async function loadInfectionPlugin(engine, refresh = true) {
27
27
  await engine.addPlugin(plugin, refresh);
28
28
  await engine.addInteractor("particlesInfection", (container) => new ParticlesInfecter(container), refresh);
29
29
  }
30
- export * from "./Options/Interfaces/IInfection";
31
- export * from "./Options/Interfaces/IInfectionStage";
30
+ export * from "./Options/Interfaces/IInfection.js";
31
+ export * from "./Options/Interfaces/IInfectionStage.js";
@@ -0,0 +1 @@
1
+ { "type": "module" }
@@ -2,11 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.InfectionInstance = void 0;
4
4
  const engine_1 = require("@tsparticles/engine");
5
- const Infecter_1 = require("./Infecter");
5
+ const Infecter_js_1 = require("./Infecter.js");
6
6
  class InfectionInstance {
7
7
  constructor(container) {
8
8
  this._container = container;
9
- this._container.infecter = new Infecter_1.Infecter(this._container);
9
+ this._container.infecter = new Infecter_js_1.Infecter(this._container);
10
10
  }
11
11
  particleFillColor(particle) {
12
12
  const options = this._container.actualOptions;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Infection = void 0;
4
- const InfectionStage_1 = require("./InfectionStage");
4
+ const InfectionStage_js_1 = require("./InfectionStage.js");
5
5
  class Infection {
6
6
  constructor() {
7
7
  this.cure = false;
@@ -30,7 +30,7 @@ class Infection {
30
30
  return;
31
31
  }
32
32
  this.stages = data.stages.map((t) => {
33
- const s = new InfectionStage_1.InfectionStage();
33
+ const s = new InfectionStage_js_1.InfectionStage();
34
34
  s.load(t);
35
35
  return s;
36
36
  });
package/cjs/index.js CHANGED
@@ -15,15 +15,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.loadInfectionPlugin = void 0;
18
- const Infection_1 = require("./Options/Classes/Infection");
19
- const InfectionInstance_1 = require("./InfectionInstance");
20
- const ParticlesInfecter_1 = require("./ParticlesInfecter");
18
+ const Infection_js_1 = require("./Options/Classes/Infection.js");
19
+ const InfectionInstance_js_1 = require("./InfectionInstance.js");
20
+ const ParticlesInfecter_js_1 = require("./ParticlesInfecter.js");
21
21
  class InfectionPlugin {
22
22
  constructor() {
23
23
  this.id = "infection";
24
24
  }
25
25
  getPlugin(container) {
26
- return new InfectionInstance_1.InfectionInstance(container);
26
+ return new InfectionInstance_js_1.InfectionInstance(container);
27
27
  }
28
28
  loadOptions(options, source) {
29
29
  if (!this.needsPlugin(options) && !this.needsPlugin(source)) {
@@ -31,7 +31,7 @@ class InfectionPlugin {
31
31
  }
32
32
  let infectionOptions = options.infection;
33
33
  if (infectionOptions?.load === undefined) {
34
- options.infection = infectionOptions = new Infection_1.Infection();
34
+ options.infection = infectionOptions = new Infection_js_1.Infection();
35
35
  }
36
36
  infectionOptions.load(source?.infection);
37
37
  }
@@ -42,8 +42,8 @@ class InfectionPlugin {
42
42
  async function loadInfectionPlugin(engine, refresh = true) {
43
43
  const plugin = new InfectionPlugin();
44
44
  await engine.addPlugin(plugin, refresh);
45
- await engine.addInteractor("particlesInfection", (container) => new ParticlesInfecter_1.ParticlesInfecter(container), refresh);
45
+ await engine.addInteractor("particlesInfection", (container) => new ParticlesInfecter_js_1.ParticlesInfecter(container), refresh);
46
46
  }
47
47
  exports.loadInfectionPlugin = loadInfectionPlugin;
48
- __exportStar(require("./Options/Interfaces/IInfection"), exports);
49
- __exportStar(require("./Options/Interfaces/IInfectionStage"), exports);
48
+ __exportStar(require("./Options/Interfaces/IInfection.js"), exports);
49
+ __exportStar(require("./Options/Interfaces/IInfectionStage.js"), exports);
@@ -0,0 +1 @@
1
+ { "type": "commonjs" }
@@ -1,5 +1,5 @@
1
1
  import { itemFromArray } from "@tsparticles/engine";
2
- import { Infecter } from "./Infecter";
2
+ import { Infecter } from "./Infecter.js";
3
3
  export class InfectionInstance {
4
4
  constructor(container) {
5
5
  this._container = container;
@@ -1,4 +1,4 @@
1
- import { InfectionStage } from "./InfectionStage";
1
+ import { InfectionStage } from "./InfectionStage.js";
2
2
  export class Infection {
3
3
  constructor() {
4
4
  this.cure = false;
package/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { Infection } from "./Options/Classes/Infection";
2
- import { InfectionInstance } from "./InfectionInstance";
3
- import { ParticlesInfecter } from "./ParticlesInfecter";
1
+ import { Infection } from "./Options/Classes/Infection.js";
2
+ import { InfectionInstance } from "./InfectionInstance.js";
3
+ import { ParticlesInfecter } from "./ParticlesInfecter.js";
4
4
  class InfectionPlugin {
5
5
  constructor() {
6
6
  this.id = "infection";
@@ -27,5 +27,5 @@ export async function loadInfectionPlugin(engine, refresh = true) {
27
27
  await engine.addPlugin(plugin, refresh);
28
28
  await engine.addInteractor("particlesInfection", (container) => new ParticlesInfecter(container), refresh);
29
29
  }
30
- export * from "./Options/Interfaces/IInfection";
31
- export * from "./Options/Interfaces/IInfectionStage";
30
+ export * from "./Options/Interfaces/IInfection.js";
31
+ export * from "./Options/Interfaces/IInfectionStage.js";
@@ -0,0 +1 @@
1
+ { "type": "module" }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@tsparticles/plugin-infection",
3
- "version": "3.0.0-beta.0",
3
+ "version": "3.0.0-beta.2",
4
4
  "description": "tsParticles infection plugin",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/matteobruni/tsparticles.git",
8
+ "url": "git+https://github.com/tsparticles/tsparticles.git",
9
9
  "directory": "plugins/infection"
10
10
  },
11
11
  "keywords": [
@@ -65,7 +65,7 @@
65
65
  "author": "Matteo Bruni <matteo.bruni@me.com>",
66
66
  "license": "MIT",
67
67
  "bugs": {
68
- "url": "https://github.com/matteobruni/tsparticles/issues"
68
+ "url": "https://github.com/tsparticles/tsparticles/issues"
69
69
  },
70
70
  "funding": [
71
71
  {
@@ -81,14 +81,26 @@
81
81
  "url": "https://www.buymeacoffee.com/matteobruni"
82
82
  }
83
83
  ],
84
- "main": "cjs/index.js",
84
+ "sideEffects": false,
85
85
  "jsdelivr": "tsparticles.plugin.infection.min.js",
86
86
  "unpkg": "tsparticles.plugin.infection.min.js",
87
+ "browser": "browser/index.js",
88
+ "main": "cjs/index.js",
87
89
  "module": "esm/index.js",
88
90
  "types": "types/index.d.ts",
89
- "sideEffects": false,
91
+ "exports": {
92
+ ".": {
93
+ "types": "./types/index.d.ts",
94
+ "browser": "./browser/index.js",
95
+ "import": "./esm/index.js",
96
+ "require": "./cjs/index.js",
97
+ "umd": "./umd/index.js",
98
+ "default": "./cjs/index.js"
99
+ },
100
+ "./package.json": "./package.json"
101
+ },
90
102
  "dependencies": {
91
- "@tsparticles/engine": "^3.0.0-beta.0"
103
+ "@tsparticles/engine": "^3.0.0-beta.2"
92
104
  },
93
105
  "publishConfig": {
94
106
  "access": "public"