@tsparticles/plugin-emitters 3.0.0-beta.0 → 3.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,6 +1,6 @@
1
1
  import { Vector, calcPositionOrRandomFromSizeRanged, deepExtend, getRangeValue, getSize, isPointInside, itemFromSingleOrMultiple, randomInRange, rangeColorToHsl, } from "@tsparticles/engine";
2
- import { Emitter } from "./Options/Classes/Emitter";
3
- import { EmitterSize } from "./Options/Classes/EmitterSize";
2
+ import { Emitter } from "./Options/Classes/Emitter.js";
3
+ import { EmitterSize } from "./Options/Classes/EmitterSize.js";
4
4
  export class EmitterInstance {
5
5
  constructor(engine, emitters, container, options, position) {
6
6
  this.emitters = emitters;
@@ -1,6 +1,6 @@
1
1
  import { arrayRandomIndex, executeOnSingleOrMultiple, isArray, isNumber, itemFromArray, } from "@tsparticles/engine";
2
- import { Emitter } from "./Options/Classes/Emitter";
3
- import { EmitterInstance } from "./EmitterInstance";
2
+ import { Emitter } from "./Options/Classes/Emitter.js";
3
+ import { EmitterInstance } from "./EmitterInstance.js";
4
4
  export class Emitters {
5
5
  constructor(engine, container) {
6
6
  this.container = container;
@@ -1,7 +1,7 @@
1
1
  import { AnimatableColor, deepExtend, executeOnSingleOrMultiple, setRangeValue, } from "@tsparticles/engine";
2
- import { EmitterLife } from "./EmitterLife";
3
- import { EmitterRate } from "./EmitterRate";
4
- import { EmitterSize } from "./EmitterSize";
2
+ import { EmitterLife } from "./EmitterLife.js";
3
+ import { EmitterRate } from "./EmitterRate.js";
4
+ import { EmitterSize } from "./EmitterSize.js";
5
5
  export class Emitter {
6
6
  constructor() {
7
7
  this.autoPlay = true;
package/browser/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { executeOnSingleOrMultiple, isArray, isInArray, } from "@tsparticles/engine";
2
- import { CircleShape } from "./Shapes/Circle/CircleShape";
3
- import { Emitter } from "./Options/Classes/Emitter";
4
- import { Emitters } from "./Emitters";
5
- import { ShapeManager } from "./ShapeManager";
6
- import { SquareShape } from "./Shapes/Square/SquareShape";
2
+ import { CircleShape } from "./Shapes/Circle/CircleShape.js";
3
+ import { Emitter } from "./Options/Classes/Emitter.js";
4
+ import { Emitters } from "./Emitters.js";
5
+ import { ShapeManager } from "./ShapeManager.js";
6
+ import { SquareShape } from "./Shapes/Square/SquareShape.js";
7
7
  class EmittersPlugin {
8
8
  constructor(engine) {
9
9
  this._engine = engine;
@@ -104,7 +104,7 @@ export async function loadEmittersPlugin(engine, refresh = true) {
104
104
  engine.addEmitterShape("circle", new CircleShape());
105
105
  engine.addEmitterShape("square", new SquareShape());
106
106
  }
107
- export * from "./EmitterContainer";
108
- export * from "./EmittersEngine";
109
- export * from "./Enums/EmitterClickMode";
110
- export * from "./Enums/EmitterShapeType";
107
+ export * from "./EmitterContainer.js";
108
+ export * from "./EmittersEngine.js";
109
+ export * from "./Enums/EmitterClickMode.js";
110
+ export * from "./Enums/EmitterShapeType.js";
@@ -0,0 +1 @@
1
+ { "type": "module" }
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EmitterInstance = void 0;
4
4
  const engine_1 = require("@tsparticles/engine");
5
- const Emitter_1 = require("./Options/Classes/Emitter");
6
- const EmitterSize_1 = require("./Options/Classes/EmitterSize");
5
+ const Emitter_js_1 = require("./Options/Classes/Emitter.js");
6
+ const EmitterSize_js_1 = require("./Options/Classes/EmitterSize.js");
7
7
  class EmitterInstance {
8
8
  constructor(engine, emitters, container, options, position) {
9
9
  this.emitters = emitters;
@@ -82,11 +82,11 @@ class EmitterInstance {
82
82
  this._currentEmitDelay = 0;
83
83
  this._currentSpawnDelay = 0;
84
84
  this._initialPosition = position;
85
- if (options instanceof Emitter_1.Emitter) {
85
+ if (options instanceof Emitter_js_1.Emitter) {
86
86
  this.options = options;
87
87
  }
88
88
  else {
89
- this.options = new Emitter_1.Emitter();
89
+ this.options = new Emitter_js_1.Emitter();
90
90
  this.options.load(options);
91
91
  }
92
92
  this._spawnDelay = ((0, engine_1.getRangeValue)(this.options.life.delay ?? 0) * 1000) / this.container.retina.reduceFactor;
@@ -108,7 +108,7 @@ class EmitterInstance {
108
108
  this.size =
109
109
  this.options.size ??
110
110
  (() => {
111
- const size = new EmitterSize_1.EmitterSize();
111
+ const size = new EmitterSize_js_1.EmitterSize();
112
112
  size.load({
113
113
  height: 0,
114
114
  mode: "percent",
package/cjs/Emitters.js CHANGED
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Emitters = void 0;
4
4
  const engine_1 = require("@tsparticles/engine");
5
- const Emitter_1 = require("./Options/Classes/Emitter");
6
- const EmitterInstance_1 = require("./EmitterInstance");
5
+ const Emitter_js_1 = require("./Options/Classes/Emitter.js");
6
+ const EmitterInstance_js_1 = require("./EmitterInstance.js");
7
7
  class Emitters {
8
8
  constructor(engine, container) {
9
9
  this.container = container;
@@ -41,9 +41,9 @@ class Emitters {
41
41
  };
42
42
  }
43
43
  addEmitter(options, position) {
44
- const emitterOptions = new Emitter_1.Emitter();
44
+ const emitterOptions = new Emitter_js_1.Emitter();
45
45
  emitterOptions.load(options);
46
- const emitter = new EmitterInstance_1.EmitterInstance(this._engine, this, this.container, emitterOptions, position);
46
+ const emitter = new EmitterInstance_js_1.EmitterInstance(this._engine, this, this.container, emitterOptions, position);
47
47
  this.array.push(emitter);
48
48
  return emitter;
49
49
  }
@@ -2,15 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Emitter = void 0;
4
4
  const engine_1 = require("@tsparticles/engine");
5
- const EmitterLife_1 = require("./EmitterLife");
6
- const EmitterRate_1 = require("./EmitterRate");
7
- const EmitterSize_1 = require("./EmitterSize");
5
+ const EmitterLife_js_1 = require("./EmitterLife.js");
6
+ const EmitterRate_js_1 = require("./EmitterRate.js");
7
+ const EmitterSize_js_1 = require("./EmitterSize.js");
8
8
  class Emitter {
9
9
  constructor() {
10
10
  this.autoPlay = true;
11
11
  this.fill = true;
12
- this.life = new EmitterLife_1.EmitterLife();
13
- this.rate = new EmitterRate_1.EmitterRate();
12
+ this.life = new EmitterLife_js_1.EmitterLife();
13
+ this.rate = new EmitterRate_js_1.EmitterRate();
14
14
  this.shape = "square";
15
15
  this.startCount = 0;
16
16
  }
@@ -23,7 +23,7 @@ class Emitter {
23
23
  }
24
24
  if (data.size !== undefined) {
25
25
  if (!this.size) {
26
- this.size = new EmitterSize_1.EmitterSize();
26
+ this.size = new EmitterSize_js_1.EmitterSize();
27
27
  }
28
28
  this.size.load(data.size);
29
29
  }
package/cjs/index.js CHANGED
@@ -16,18 +16,18 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.loadEmittersPlugin = void 0;
18
18
  const engine_1 = require("@tsparticles/engine");
19
- const CircleShape_1 = require("./Shapes/Circle/CircleShape");
20
- const Emitter_1 = require("./Options/Classes/Emitter");
21
- const Emitters_1 = require("./Emitters");
22
- const ShapeManager_1 = require("./ShapeManager");
23
- const SquareShape_1 = require("./Shapes/Square/SquareShape");
19
+ const CircleShape_js_1 = require("./Shapes/Circle/CircleShape.js");
20
+ const Emitter_js_1 = require("./Options/Classes/Emitter.js");
21
+ const Emitters_js_1 = require("./Emitters.js");
22
+ const ShapeManager_js_1 = require("./ShapeManager.js");
23
+ const SquareShape_js_1 = require("./Shapes/Square/SquareShape.js");
24
24
  class EmittersPlugin {
25
25
  constructor(engine) {
26
26
  this._engine = engine;
27
27
  this.id = "emitters";
28
28
  }
29
29
  getPlugin(container) {
30
- return new Emitters_1.Emitters(this._engine, container);
30
+ return new Emitters_js_1.Emitters(this._engine, container);
31
31
  }
32
32
  loadOptions(options, source) {
33
33
  if (!this.needsPlugin(options) && !this.needsPlugin(source)) {
@@ -35,7 +35,7 @@ class EmittersPlugin {
35
35
  }
36
36
  if (source?.emitters) {
37
37
  options.emitters = (0, engine_1.executeOnSingleOrMultiple)(source.emitters, (emitter) => {
38
- const tmp = new Emitter_1.Emitter();
38
+ const tmp = new Emitter_js_1.Emitter();
39
39
  tmp.load(emitter);
40
40
  return tmp;
41
41
  });
@@ -49,7 +49,7 @@ class EmittersPlugin {
49
49
  enable: true,
50
50
  },
51
51
  value: interactivityEmitters.map((s) => {
52
- const tmp = new Emitter_1.Emitter();
52
+ const tmp = new Emitter_js_1.Emitter();
53
53
  tmp.load(s);
54
54
  return tmp;
55
55
  }),
@@ -65,14 +65,14 @@ class EmittersPlugin {
65
65
  enable: emitterMode.random.enable ?? false,
66
66
  },
67
67
  value: emitterMode.value.map((s) => {
68
- const tmp = new Emitter_1.Emitter();
68
+ const tmp = new Emitter_js_1.Emitter();
69
69
  tmp.load(s);
70
70
  return tmp;
71
71
  }),
72
72
  };
73
73
  }
74
74
  else {
75
- const tmp = new Emitter_1.Emitter();
75
+ const tmp = new Emitter_js_1.Emitter();
76
76
  tmp.load(emitterMode.value);
77
77
  options.interactivity.modes.emitters = {
78
78
  random: {
@@ -89,7 +89,7 @@ class EmittersPlugin {
89
89
  count: 1,
90
90
  enable: false,
91
91
  },
92
- value: new Emitter_1.Emitter(),
92
+ value: new Emitter_js_1.Emitter(),
93
93
  });
94
94
  emitterOptions.value.load(interactivityEmitters);
95
95
  }
@@ -109,7 +109,7 @@ class EmittersPlugin {
109
109
  }
110
110
  async function loadEmittersPlugin(engine, refresh = true) {
111
111
  if (!engine.emitterShapeManager) {
112
- engine.emitterShapeManager = new ShapeManager_1.ShapeManager(engine);
112
+ engine.emitterShapeManager = new ShapeManager_js_1.ShapeManager(engine);
113
113
  }
114
114
  if (!engine.addEmitterShape) {
115
115
  engine.addEmitterShape = (name, shape) => {
@@ -118,11 +118,11 @@ async function loadEmittersPlugin(engine, refresh = true) {
118
118
  }
119
119
  const plugin = new EmittersPlugin(engine);
120
120
  await engine.addPlugin(plugin, refresh);
121
- engine.addEmitterShape("circle", new CircleShape_1.CircleShape());
122
- engine.addEmitterShape("square", new SquareShape_1.SquareShape());
121
+ engine.addEmitterShape("circle", new CircleShape_js_1.CircleShape());
122
+ engine.addEmitterShape("square", new SquareShape_js_1.SquareShape());
123
123
  }
124
124
  exports.loadEmittersPlugin = loadEmittersPlugin;
125
- __exportStar(require("./EmitterContainer"), exports);
126
- __exportStar(require("./EmittersEngine"), exports);
127
- __exportStar(require("./Enums/EmitterClickMode"), exports);
128
- __exportStar(require("./Enums/EmitterShapeType"), exports);
125
+ __exportStar(require("./EmitterContainer.js"), exports);
126
+ __exportStar(require("./EmittersEngine.js"), exports);
127
+ __exportStar(require("./Enums/EmitterClickMode.js"), exports);
128
+ __exportStar(require("./Enums/EmitterShapeType.js"), exports);
@@ -0,0 +1 @@
1
+ { "type": "commonjs" }
@@ -1,6 +1,6 @@
1
1
  import { Vector, calcPositionOrRandomFromSizeRanged, deepExtend, getRangeValue, getSize, isPointInside, itemFromSingleOrMultiple, randomInRange, rangeColorToHsl, } from "@tsparticles/engine";
2
- import { Emitter } from "./Options/Classes/Emitter";
3
- import { EmitterSize } from "./Options/Classes/EmitterSize";
2
+ import { Emitter } from "./Options/Classes/Emitter.js";
3
+ import { EmitterSize } from "./Options/Classes/EmitterSize.js";
4
4
  export class EmitterInstance {
5
5
  constructor(engine, emitters, container, options, position) {
6
6
  this.emitters = emitters;
package/esm/Emitters.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { arrayRandomIndex, executeOnSingleOrMultiple, isArray, isNumber, itemFromArray, } from "@tsparticles/engine";
2
- import { Emitter } from "./Options/Classes/Emitter";
3
- import { EmitterInstance } from "./EmitterInstance";
2
+ import { Emitter } from "./Options/Classes/Emitter.js";
3
+ import { EmitterInstance } from "./EmitterInstance.js";
4
4
  export class Emitters {
5
5
  constructor(engine, container) {
6
6
  this.container = container;
@@ -1,7 +1,7 @@
1
1
  import { AnimatableColor, deepExtend, executeOnSingleOrMultiple, setRangeValue, } from "@tsparticles/engine";
2
- import { EmitterLife } from "./EmitterLife";
3
- import { EmitterRate } from "./EmitterRate";
4
- import { EmitterSize } from "./EmitterSize";
2
+ import { EmitterLife } from "./EmitterLife.js";
3
+ import { EmitterRate } from "./EmitterRate.js";
4
+ import { EmitterSize } from "./EmitterSize.js";
5
5
  export class Emitter {
6
6
  constructor() {
7
7
  this.autoPlay = true;
package/esm/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { executeOnSingleOrMultiple, isArray, isInArray, } from "@tsparticles/engine";
2
- import { CircleShape } from "./Shapes/Circle/CircleShape";
3
- import { Emitter } from "./Options/Classes/Emitter";
4
- import { Emitters } from "./Emitters";
5
- import { ShapeManager } from "./ShapeManager";
6
- import { SquareShape } from "./Shapes/Square/SquareShape";
2
+ import { CircleShape } from "./Shapes/Circle/CircleShape.js";
3
+ import { Emitter } from "./Options/Classes/Emitter.js";
4
+ import { Emitters } from "./Emitters.js";
5
+ import { ShapeManager } from "./ShapeManager.js";
6
+ import { SquareShape } from "./Shapes/Square/SquareShape.js";
7
7
  class EmittersPlugin {
8
8
  constructor(engine) {
9
9
  this._engine = engine;
@@ -104,7 +104,7 @@ export async function loadEmittersPlugin(engine, refresh = true) {
104
104
  engine.addEmitterShape("circle", new CircleShape());
105
105
  engine.addEmitterShape("square", new SquareShape());
106
106
  }
107
- export * from "./EmitterContainer";
108
- export * from "./EmittersEngine";
109
- export * from "./Enums/EmitterClickMode";
110
- export * from "./Enums/EmitterShapeType";
107
+ export * from "./EmitterContainer.js";
108
+ export * from "./EmittersEngine.js";
109
+ export * from "./Enums/EmitterClickMode.js";
110
+ export * from "./Enums/EmitterShapeType.js";
@@ -0,0 +1 @@
1
+ { "type": "module" }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/plugin-emitters",
3
- "version": "3.0.0-beta.0",
3
+ "version": "3.0.0-beta.1",
4
4
  "description": "tsParticles emitters plugin",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -67,14 +67,26 @@
67
67
  "bugs": {
68
68
  "url": "https://github.com/matteobruni/tsparticles/issues"
69
69
  },
70
- "main": "cjs/index.js",
70
+ "sideEffects": false,
71
71
  "jsdelivr": "tsparticles.plugin.emitters.min.js",
72
72
  "unpkg": "tsparticles.plugin.emitters.min.js",
73
+ "browser": "browser/index.js",
74
+ "main": "cjs/index.js",
73
75
  "module": "esm/index.js",
74
76
  "types": "types/index.d.ts",
75
- "sideEffects": false,
77
+ "exports": {
78
+ ".": {
79
+ "types": "./types/index.d.ts",
80
+ "browser": "./browser/index.js",
81
+ "import": "./esm/index.js",
82
+ "require": "./cjs/index.js",
83
+ "umd": "./umd/index.js",
84
+ "default": "./cjs/index.js"
85
+ },
86
+ "./package.json": "./package.json"
87
+ },
76
88
  "dependencies": {
77
- "@tsparticles/engine": "^3.0.0-beta.0"
89
+ "@tsparticles/engine": "^3.0.0-beta.1"
78
90
  },
79
91
  "publishConfig": {
80
92
  "access": "public"
package/report.html CHANGED
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="UTF-8"/>
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
6
- <title>@tsparticles/plugin-emitters [24 Aug 2023 at 18:02]</title>
6
+ <title>@tsparticles/plugin-emitters [25 Aug 2023 at 16:12]</title>
7
7
  <link rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAABrVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+O1foceMD///+J0/qK1Pr7/v8Xdr/9///W8P4UdL7L7P0Scr2r4Pyj3vwad8D5/f/2/f+55f3E6f34+/2H0/ojfMKpzOd0rNgQcb3F3O/j9f7c8v6g3Pz0/P/w+v/q+P7n9v6T1/uQ1vuE0vqLut/y+v+Z2fvt+f+15Pzv9fuc2/vR7v2V2Pvd6/bg9P7I6/285/2y4/yp3/zp8vk8i8kqgMT7/P31+fyv4vxGkcz6/P6/6P3j7vfS5PNnpNUxhcbO7f7F6v3O4vHK3/DA2u631Ouy0eqXweKJud5wqthfoNMMbLvY8f73+v2dxeR8sNtTmdDx9/zX6PSjyeaCtd1YnNGX2PuQveCGt95Nls42h8dLlM3F4vBtAAAAM3RSTlMAAyOx0/sKBvik8opWGBMOAe3l1snDm2E9LSb06eHcu5JpHbarfHZCN9CBb08zzkdNS0kYaptYAAAFV0lEQVRYw92X51/aYBDHHS2O2qqttVbrqNq9m+TJIAYIShBkWwqIiCgoWvfeq7Z2/s29hyQNyUcR7LveGwVyXy6XH8/9rqxglLfUPLxVduUor3h0rfp2TYvpivk37929TkG037hffoX0+peVtZQc1589rigVUdXS/ABSAyEmGIO/1XfvldSK8vs3OqB6u3m0nxmIrvgB0dj7rr7Y9IbuF68hnfFaiHA/sxqm0wciIG43P60qKv9WXWc1RXGh/mFESFABTSBi0sNAKzqet17eCtOb3kZIDwxEEU0oAIJGYxNBDhBND29e0rtXXbcpuPmED9IhEAAQ/AXEaF8EPmnrrKsv0LvWR3fg5sWDNAFZOgAgaKvZDogHNU9MFwnnYROkc56RD5CjAbQX9Ow4g7upCsvYu55aSI/Nj0H1akgKQEUM94dwK65hYRmFU9MIcH/fqJYOZYcnuJSU/waKDgTOEVaVKhwrTRP5XzgSpAITYzom7UvkhFX5VutmxeNnWDjjswTKTyfgluNDGbUpWissXhF3s7mlSml+czWkg3D0l1nNjGNjz3myOQOa1KM/jOS6ebdbAVTCi4gljHSFrviza7tOgRWcS0MOUX9zdNgag5w7rRqA44Lzw0hr1WqES36dFliSJFlh2rXIae3FFcDDgKdxrUIDePr8jGcSClV1u7A9xeN0ModY/pHMxmR1EzRh8TJiwqsHmKW0l4FCEZI+jHio+JdPPE9qwQtTRxku2D8sIeRL2LnxWSllANCQGOIiqVHAz2ye2JR0DcH+HoxDkaADLjgxjKQ+AwCX/g0+DNgdG0ukYCONAe+dbc2IAc6fwt1ARoDSezNHxV2Cmzwv3O6lDMV55edBGwGK9n1+x2F8EDfAGCxug8MhpsMEcTEAWf3rx2vZhe/LAmtIn/6apE6PN0ULKgywD9mmdxbmFl3OvD5AS5fW5zLbv/YHmcsBTjf/afDz3MaZTVCfAP9z6/Bw6ycv8EUBWJIn9zYcoAWWlW9+OzO3vkTy8H+RANLmdrpOuYWdZYEXpo+TlCJrW5EARb7fF+bWdqf3hhyZI1nWJQHgznErZhbjoEsWqi8dQNoE294aldzFurwSABL2XXMf9+H1VQGke9exw5P/AnA5Pv5ngMul7LOvO922iwACu8WkCwLCafvM4CeWPxfA8lNHcWZSoi8EwMAIciKX2Z4SWCMAa3snCZ/G4EA8D6CMLNFsGQhkkz/gQNEBbPCbWsxGUpYVu3z8IyNAknwJkfPMEhLyrdi5RTyUVACkw4GSFRNWJNEW+fgPGwHD8/JxnRuLabN4CGNRkAE23na2+VmEAUmrYymSGjMAYqH84YUIyzgzs3XC7gNgH36Vcc4zKY9o9fgPBXUAiHHwVboBHGLiX6Zcjp1f2wu4tvzZKo0ecPnDtQYDQvJXaBeNzce45Fp28ZQLrEZVuFqgBwOalArKXnW1UzlnSusQKJqKYNuz4tOnI6sZG4zanpemv+7ySU2jbA9h6uhcgpfy6G2PahirDZ6zvq6zDduMVFTKvzw8wgyEdelwY9in3XkEPs3osJuwRQ4qTkfzifndg9Gfc4pdsu82+tTnHZTBa2EAMrqr2t43pguc8tNm7JQVQ2S0ukj2d22dhXYP0/veWtwKrCkNoNimAN5+Xr/oLrxswKbVJjteWrX7eR63o4j9q0GxnaBdWgGA5VStpanIjQmEhV0/nVt5VOFUvix6awJhPcAaTEShgrG+iGyvb5a0Ndb1YGHFPEwoqAinoaykaID1o1pdPNu7XsnCKQ3R+hwWIIhGvORcJUBYXe3Xa3vq/mF/N9V13ugufMkfXn+KHsRD0B8AAAAASUVORK5CYII=" type="image/x-icon" />
8
8
 
9
9
  <script>
@@ -31,7 +31,7 @@
31
31
  <body>
32
32
  <div id="app"></div>
33
33
  <script>
34
- window.chartData = [{"label":"tsparticles.plugin.emitters.js","isAsset":true,"statSize":20963,"parsedSize":24883,"gzipSize":5488,"groups":[{"label":"dist/browser","path":"./dist/browser","statSize":20921,"groups":[{"id":956,"label":"index.js + 9 modules (concatenated)","path":"./dist/browser/index.js + 9 modules (concatenated)","statSize":20921,"parsedSize":24883,"gzipSize":5488,"concatenated":true,"groups":[{"label":"dist/browser","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser","statSize":20921,"groups":[{"id":null,"label":"index.js","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/index.js","statSize":3491,"parsedSize":4152,"gzipSize":915,"inaccurateSizes":true},{"id":null,"label":"Emitters.js","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/Emitters.js","statSize":3641,"parsedSize":4330,"gzipSize":955,"inaccurateSizes":true},{"label":"Options/Classes","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/Options/Classes","statSize":3102,"groups":[{"id":null,"label":"Emitter.js","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/Options/Classes/Emitter.js","statSize":1784,"parsedSize":2121,"gzipSize":467,"inaccurateSizes":true},{"id":null,"label":"EmitterLife.js","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/Options/Classes/EmitterLife.js","statSize":510,"parsedSize":606,"gzipSize":133,"inaccurateSizes":true},{"id":null,"label":"EmitterRate.js","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/Options/Classes/EmitterRate.js","statSize":402,"parsedSize":478,"gzipSize":105,"inaccurateSizes":true},{"id":null,"label":"EmitterSize.js","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/Options/Classes/EmitterSize.js","statSize":406,"parsedSize":482,"gzipSize":106,"inaccurateSizes":true}],"parsedSize":3689,"gzipSize":813,"inaccurateSizes":true},{"id":null,"label":"ShapeManager.js","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/ShapeManager.js","statSize":318,"parsedSize":378,"gzipSize":83,"inaccurateSizes":true},{"label":"Shapes","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/Shapes","statSize":2069,"groups":[{"label":"Circle","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/Shapes/Circle","statSize":985,"groups":[{"id":null,"label":"CircleShape.js","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/Shapes/Circle/CircleShape.js","statSize":985,"parsedSize":1171,"gzipSize":258,"inaccurateSizes":true}],"parsedSize":1171,"gzipSize":258,"inaccurateSizes":true},{"label":"Square","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/Shapes/Square","statSize":1084,"groups":[{"id":null,"label":"SquareShape.js","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/Shapes/Square/SquareShape.js","statSize":1084,"parsedSize":1289,"gzipSize":284,"inaccurateSizes":true}],"parsedSize":1289,"gzipSize":284,"inaccurateSizes":true}],"parsedSize":2460,"gzipSize":542,"inaccurateSizes":true},{"id":null,"label":"EmitterInstance.js","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/EmitterInstance.js","statSize":8300,"parsedSize":9871,"gzipSize":2177,"inaccurateSizes":true}],"parsedSize":24883,"gzipSize":5488,"inaccurateSizes":true}]}],"parsedSize":24883,"gzipSize":5488},{"label":"engine\",\"commonjs2\":\"@tsparticles/engine\",\"amd\":\"@tsparticles","path":"./engine\",\"commonjs2\":\"@tsparticles/engine\",\"amd\":\"@tsparticles","statSize":42,"groups":[{"id":533,"label":"engine\",\"root\":\"window\"}","path":"./engine\",\"commonjs2\":\"@tsparticles/engine\",\"amd\":\"@tsparticles/engine\",\"root\":\"window\"}","statSize":42}],"parsedSize":0,"gzipSize":0}],"isInitialByEntrypoint":{"tsparticles.plugin.emitters":true}}];
34
+ window.chartData = [{"label":"tsparticles.plugin.emitters.js","isAsset":true,"statSize":21011,"parsedSize":24883,"gzipSize":5488,"groups":[{"label":"dist/browser","path":"./dist/browser","statSize":20969,"groups":[{"id":956,"label":"index.js + 9 modules (concatenated)","path":"./dist/browser/index.js + 9 modules (concatenated)","statSize":20969,"parsedSize":24883,"gzipSize":5488,"concatenated":true,"groups":[{"label":"dist/browser","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser","statSize":20969,"groups":[{"id":null,"label":"index.js","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/index.js","statSize":3518,"parsedSize":4174,"gzipSize":920,"inaccurateSizes":true},{"id":null,"label":"Emitters.js","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/Emitters.js","statSize":3647,"parsedSize":4327,"gzipSize":954,"inaccurateSizes":true},{"label":"Options/Classes","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/Options/Classes","statSize":3111,"groups":[{"id":null,"label":"Emitter.js","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/Options/Classes/Emitter.js","statSize":1793,"parsedSize":2127,"gzipSize":469,"inaccurateSizes":true},{"id":null,"label":"EmitterLife.js","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/Options/Classes/EmitterLife.js","statSize":510,"parsedSize":605,"gzipSize":133,"inaccurateSizes":true},{"id":null,"label":"EmitterRate.js","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/Options/Classes/EmitterRate.js","statSize":402,"parsedSize":477,"gzipSize":105,"inaccurateSizes":true},{"id":null,"label":"EmitterSize.js","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/Options/Classes/EmitterSize.js","statSize":406,"parsedSize":481,"gzipSize":106,"inaccurateSizes":true}],"parsedSize":3691,"gzipSize":814,"inaccurateSizes":true},{"id":null,"label":"ShapeManager.js","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/ShapeManager.js","statSize":318,"parsedSize":377,"gzipSize":83,"inaccurateSizes":true},{"label":"Shapes","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/Shapes","statSize":2069,"groups":[{"label":"Circle","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/Shapes/Circle","statSize":985,"groups":[{"id":null,"label":"CircleShape.js","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/Shapes/Circle/CircleShape.js","statSize":985,"parsedSize":1168,"gzipSize":257,"inaccurateSizes":true}],"parsedSize":1168,"gzipSize":257,"inaccurateSizes":true},{"label":"Square","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/Shapes/Square","statSize":1084,"groups":[{"id":null,"label":"SquareShape.js","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/Shapes/Square/SquareShape.js","statSize":1084,"parsedSize":1286,"gzipSize":283,"inaccurateSizes":true}],"parsedSize":1286,"gzipSize":283,"inaccurateSizes":true}],"parsedSize":2455,"gzipSize":541,"inaccurateSizes":true},{"id":null,"label":"EmitterInstance.js","path":"./dist/browser/index.js + 9 modules (concatenated)/dist/browser/EmitterInstance.js","statSize":8306,"parsedSize":9856,"gzipSize":2173,"inaccurateSizes":true}],"parsedSize":24883,"gzipSize":5488,"inaccurateSizes":true}]}],"parsedSize":24883,"gzipSize":5488},{"label":"engine\",\"commonjs2\":\"@tsparticles/engine\",\"amd\":\"@tsparticles","path":"./engine\",\"commonjs2\":\"@tsparticles/engine\",\"amd\":\"@tsparticles","statSize":42,"groups":[{"id":533,"label":"engine\",\"root\":\"window\"}","path":"./engine\",\"commonjs2\":\"@tsparticles/engine\",\"amd\":\"@tsparticles/engine\",\"root\":\"window\"}","statSize":42}],"parsedSize":0,"gzipSize":0}],"isInitialByEntrypoint":{"tsparticles.plugin.emitters":true}}];
35
35
  window.entrypoints = ["tsparticles.plugin.emitters","tsparticles.plugin.emitters.min"];
36
36
  window.defaultSizes = "parsed";
37
37
  </script>
@@ -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.1
8
8
  */
9
9
  (function webpackUniversalModuleDefinition(root, factory) {
10
10
  if(typeof exports === 'object' && typeof module === 'object')
@@ -1 +1 @@
1
- /*! tsParticles Emitters Plugin v3.0.0-beta.0 by Matteo Bruni */
1
+ /*! tsParticles Emitters Plugin v3.0.0-beta.1 by Matteo Bruni */
@@ -1,7 +1,7 @@
1
1
  import type { Container, ICoordinates, RecursivePartial } from "@tsparticles/engine";
2
- import type { EmitterInstance } from "./EmitterInstance";
3
- import type { EmitterOptions } from "./types";
4
- import type { IEmitter } from "./Options/Interfaces/IEmitter";
2
+ import type { EmitterInstance } from "./EmitterInstance.js";
3
+ import type { EmitterOptions } from "./types.js";
4
+ import type { IEmitter } from "./Options/Interfaces/IEmitter.js";
5
5
  export type EmitterContainer = Container & {
6
6
  actualOptions: EmitterOptions;
7
7
  addEmitter: (options: RecursivePartial<IEmitter>, position?: ICoordinates) => EmitterInstance;
@@ -1,9 +1,9 @@
1
1
  import { type Container, type ICoordinates, type IDelta, type IDimension, type IHsl, type RecursivePartial } from "@tsparticles/engine";
2
- import { Emitter } from "./Options/Classes/Emitter";
3
- import type { Emitters } from "./Emitters";
4
- import type { EmittersEngine } from "./EmittersEngine";
5
- import type { IEmitter } from "./Options/Interfaces/IEmitter";
6
- import type { IEmitterSize } from "./Options/Interfaces/IEmitterSize";
2
+ import { Emitter } from "./Options/Classes/Emitter.js";
3
+ import type { Emitters } from "./Emitters.js";
4
+ import type { EmittersEngine } from "./EmittersEngine.js";
5
+ import type { IEmitter } from "./Options/Interfaces/IEmitter.js";
6
+ import type { IEmitterSize } from "./Options/Interfaces/IEmitterSize.js";
7
7
  export declare class EmitterInstance {
8
8
  private readonly emitters;
9
9
  private readonly container;
@@ -1,10 +1,10 @@
1
1
  import { type IContainerPlugin, type ICoordinates, type IDelta, type RecursivePartial, type SingleOrMultiple } from "@tsparticles/engine";
2
- import { Emitter } from "./Options/Classes/Emitter";
3
- import type { EmitterContainer } from "./EmitterContainer";
4
- import { EmitterInstance } from "./EmitterInstance";
5
- import type { EmitterModeOptions } from "./types";
6
- import type { EmittersEngine } from "./EmittersEngine";
7
- import type { IEmitter } from "./Options/Interfaces/IEmitter";
2
+ import { Emitter } from "./Options/Classes/Emitter.js";
3
+ import type { EmitterContainer } from "./EmitterContainer.js";
4
+ import { EmitterInstance } from "./EmitterInstance.js";
5
+ import type { EmitterModeOptions } from "./types.js";
6
+ import type { EmittersEngine } from "./EmittersEngine.js";
7
+ import type { IEmitter } from "./Options/Interfaces/IEmitter.js";
8
8
  export declare class Emitters implements IContainerPlugin {
9
9
  private readonly container;
10
10
  array: EmitterInstance[];
@@ -1,6 +1,6 @@
1
1
  import type { Engine } from "@tsparticles/engine";
2
- import type { IEmitterShape } from "./IEmitterShape";
3
- import type { ShapeManager } from "./ShapeManager";
2
+ import type { IEmitterShape } from "./IEmitterShape.js";
3
+ import type { ShapeManager } from "./ShapeManager.js";
4
4
  export type EmittersEngine = Engine & {
5
5
  addEmitterShape?: (name: string, shape: IEmitterShape) => void;
6
6
  emitterShapeManager?: ShapeManager;
@@ -1,9 +1,9 @@
1
1
  import { AnimatableColor, type IOptionLoader, type IParticlesOptions, type IRangedCoordinates, type MoveDirection, type MoveDirectionAlt, type RecursivePartial, type SingleOrMultiple } from "@tsparticles/engine";
2
- import { EmitterLife } from "./EmitterLife";
3
- import { EmitterRate } from "./EmitterRate";
4
- import { EmitterShapeType } from "../../Enums/EmitterShapeType";
5
- import { EmitterSize } from "./EmitterSize";
6
- import type { IEmitter } from "../Interfaces/IEmitter";
2
+ import { EmitterLife } from "./EmitterLife.js";
3
+ import { EmitterRate } from "./EmitterRate.js";
4
+ import { EmitterShapeType } from "../../Enums/EmitterShapeType.js";
5
+ import { EmitterSize } from "./EmitterSize.js";
6
+ import type { IEmitter } from "../Interfaces/IEmitter.js";
7
7
  export declare class Emitter implements IEmitter, IOptionLoader<IEmitter> {
8
8
  autoPlay: boolean;
9
9
  direction?: MoveDirection | keyof typeof MoveDirection | MoveDirectionAlt | number;
@@ -1,5 +1,5 @@
1
1
  import { type IOptionLoader, type RangeValue, type RecursivePartial } from "@tsparticles/engine";
2
- import type { IEmitterLife } from "../Interfaces/IEmitterLife";
2
+ import type { IEmitterLife } from "../Interfaces/IEmitterLife.js";
3
3
  export declare class EmitterLife implements IEmitterLife, IOptionLoader<IEmitterLife> {
4
4
  count?: number;
5
5
  delay?: RangeValue;
@@ -1,5 +1,5 @@
1
1
  import { type IOptionLoader, type RangeValue, type RecursivePartial } from "@tsparticles/engine";
2
- import type { IEmitterRate } from "../Interfaces/IEmitterRate";
2
+ import type { IEmitterRate } from "../Interfaces/IEmitterRate.js";
3
3
  export declare class EmitterRate implements IEmitterRate, IOptionLoader<IEmitterRate> {
4
4
  delay: RangeValue;
5
5
  quantity: RangeValue;
@@ -1,5 +1,5 @@
1
1
  import { type IOptionLoader, PixelMode, type RecursivePartial } from "@tsparticles/engine";
2
- import type { IEmitterSize } from "../Interfaces/IEmitterSize";
2
+ import type { IEmitterSize } from "../Interfaces/IEmitterSize.js";
3
3
  export declare class EmitterSize implements IEmitterSize, IOptionLoader<IEmitterSize> {
4
4
  height: number;
5
5
  mode: PixelMode | keyof typeof PixelMode;
@@ -1,8 +1,8 @@
1
1
  import type { IAnimatableColor, IParticlesOptions, IRangedCoordinates, MoveDirection, MoveDirectionAlt, RecursivePartial, SingleOrMultiple } from "@tsparticles/engine";
2
- import type { EmitterShapeType } from "../../Enums/EmitterShapeType";
3
- import type { IEmitterLife } from "./IEmitterLife";
4
- import type { IEmitterRate } from "./IEmitterRate";
5
- import type { IEmitterSize } from "./IEmitterSize";
2
+ import type { EmitterShapeType } from "../../Enums/EmitterShapeType.js";
3
+ import type { IEmitterLife } from "./IEmitterLife.js";
4
+ import type { IEmitterRate } from "./IEmitterRate.js";
5
+ import type { IEmitterSize } from "./IEmitterSize.js";
6
6
  export interface IEmitter {
7
7
  autoPlay: boolean;
8
8
  direction?: MoveDirection | keyof typeof MoveDirection | MoveDirectionAlt | number;
@@ -1,5 +1,5 @@
1
1
  import type { Engine } from "@tsparticles/engine";
2
- import type { IEmitterShape } from "./IEmitterShape";
2
+ import type { IEmitterShape } from "./IEmitterShape.js";
3
3
  export declare class ShapeManager {
4
4
  private readonly _engine;
5
5
  constructor(engine: Engine);
@@ -1,5 +1,5 @@
1
1
  import { type ICoordinates, type IDimension } from "@tsparticles/engine";
2
- import type { IEmitterShape } from "../../IEmitterShape";
2
+ import type { IEmitterShape } from "../../IEmitterShape.js";
3
3
  export declare class CircleShape implements IEmitterShape {
4
4
  randomPosition(position: ICoordinates, size: IDimension, fill: boolean): ICoordinates;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { type ICoordinates, type IDimension } from "@tsparticles/engine";
2
- import type { IEmitterShape } from "../../IEmitterShape";
2
+ import type { IEmitterShape } from "../../IEmitterShape.js";
3
3
  export declare class SquareShape implements IEmitterShape {
4
4
  randomPosition(position: ICoordinates, size: IDimension, fill: boolean): ICoordinates;
5
5
  }
package/types/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import type { EmittersEngine } from "./EmittersEngine";
1
+ import type { EmittersEngine } from "./EmittersEngine.js";
2
2
  export declare function loadEmittersPlugin(engine: EmittersEngine, refresh?: boolean): Promise<void>;
3
- export * from "./EmitterContainer";
4
- export * from "./EmittersEngine";
5
- export * from "./Enums/EmitterClickMode";
6
- export * from "./Enums/EmitterShapeType";
3
+ export * from "./EmitterContainer.js";
4
+ export * from "./EmittersEngine.js";
5
+ export * from "./Enums/EmitterClickMode.js";
6
+ export * from "./Enums/EmitterShapeType.js";
package/types/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { IOptions, Options, SingleOrMultiple } from "@tsparticles/engine";
2
- import type { Emitter } from "./Options/Classes/Emitter";
3
- import type { IEmitter } from "./Options/Interfaces/IEmitter";
2
+ import type { Emitter } from "./Options/Classes/Emitter.js";
3
+ import type { IEmitter } from "./Options/Interfaces/IEmitter.js";
4
4
  export interface IEmitterModeOptions {
5
5
  random: IEmitterModeRandomOptions;
6
6
  value: SingleOrMultiple<IEmitter>;
@@ -4,15 +4,15 @@
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", "./Options/Classes/Emitter", "./Options/Classes/EmitterSize"], factory);
7
+ define(["require", "exports", "@tsparticles/engine", "./Options/Classes/Emitter.js", "./Options/Classes/EmitterSize.js"], factory);
8
8
  }
9
9
  })(function (require, exports) {
10
10
  "use strict";
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.EmitterInstance = void 0;
13
13
  const engine_1 = require("@tsparticles/engine");
14
- const Emitter_1 = require("./Options/Classes/Emitter");
15
- const EmitterSize_1 = require("./Options/Classes/EmitterSize");
14
+ const Emitter_js_1 = require("./Options/Classes/Emitter.js");
15
+ const EmitterSize_js_1 = require("./Options/Classes/EmitterSize.js");
16
16
  class EmitterInstance {
17
17
  constructor(engine, emitters, container, options, position) {
18
18
  this.emitters = emitters;
@@ -91,11 +91,11 @@
91
91
  this._currentEmitDelay = 0;
92
92
  this._currentSpawnDelay = 0;
93
93
  this._initialPosition = position;
94
- if (options instanceof Emitter_1.Emitter) {
94
+ if (options instanceof Emitter_js_1.Emitter) {
95
95
  this.options = options;
96
96
  }
97
97
  else {
98
- this.options = new Emitter_1.Emitter();
98
+ this.options = new Emitter_js_1.Emitter();
99
99
  this.options.load(options);
100
100
  }
101
101
  this._spawnDelay = ((0, engine_1.getRangeValue)(this.options.life.delay ?? 0) * 1000) / this.container.retina.reduceFactor;
@@ -117,7 +117,7 @@
117
117
  this.size =
118
118
  this.options.size ??
119
119
  (() => {
120
- const size = new EmitterSize_1.EmitterSize();
120
+ const size = new EmitterSize_js_1.EmitterSize();
121
121
  size.load({
122
122
  height: 0,
123
123
  mode: "percent",
package/umd/Emitters.js CHANGED
@@ -4,15 +4,15 @@
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", "./Options/Classes/Emitter", "./EmitterInstance"], factory);
7
+ define(["require", "exports", "@tsparticles/engine", "./Options/Classes/Emitter.js", "./EmitterInstance.js"], factory);
8
8
  }
9
9
  })(function (require, exports) {
10
10
  "use strict";
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Emitters = void 0;
13
13
  const engine_1 = require("@tsparticles/engine");
14
- const Emitter_1 = require("./Options/Classes/Emitter");
15
- const EmitterInstance_1 = require("./EmitterInstance");
14
+ const Emitter_js_1 = require("./Options/Classes/Emitter.js");
15
+ const EmitterInstance_js_1 = require("./EmitterInstance.js");
16
16
  class Emitters {
17
17
  constructor(engine, container) {
18
18
  this.container = container;
@@ -50,9 +50,9 @@
50
50
  };
51
51
  }
52
52
  addEmitter(options, position) {
53
- const emitterOptions = new Emitter_1.Emitter();
53
+ const emitterOptions = new Emitter_js_1.Emitter();
54
54
  emitterOptions.load(options);
55
- const emitter = new EmitterInstance_1.EmitterInstance(this._engine, this, this.container, emitterOptions, position);
55
+ const emitter = new EmitterInstance_js_1.EmitterInstance(this._engine, this, this.container, emitterOptions, position);
56
56
  this.array.push(emitter);
57
57
  return emitter;
58
58
  }
@@ -4,22 +4,22 @@
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", "./EmitterLife", "./EmitterRate", "./EmitterSize"], factory);
7
+ define(["require", "exports", "@tsparticles/engine", "./EmitterLife.js", "./EmitterRate.js", "./EmitterSize.js"], factory);
8
8
  }
9
9
  })(function (require, exports) {
10
10
  "use strict";
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Emitter = void 0;
13
13
  const engine_1 = require("@tsparticles/engine");
14
- const EmitterLife_1 = require("./EmitterLife");
15
- const EmitterRate_1 = require("./EmitterRate");
16
- const EmitterSize_1 = require("./EmitterSize");
14
+ const EmitterLife_js_1 = require("./EmitterLife.js");
15
+ const EmitterRate_js_1 = require("./EmitterRate.js");
16
+ const EmitterSize_js_1 = require("./EmitterSize.js");
17
17
  class Emitter {
18
18
  constructor() {
19
19
  this.autoPlay = true;
20
20
  this.fill = true;
21
- this.life = new EmitterLife_1.EmitterLife();
22
- this.rate = new EmitterRate_1.EmitterRate();
21
+ this.life = new EmitterLife_js_1.EmitterLife();
22
+ this.rate = new EmitterRate_js_1.EmitterRate();
23
23
  this.shape = "square";
24
24
  this.startCount = 0;
25
25
  }
@@ -32,7 +32,7 @@
32
32
  }
33
33
  if (data.size !== undefined) {
34
34
  if (!this.size) {
35
- this.size = new EmitterSize_1.EmitterSize();
35
+ this.size = new EmitterSize_js_1.EmitterSize();
36
36
  }
37
37
  this.size.load(data.size);
38
38
  }
package/umd/index.js CHANGED
@@ -18,25 +18,25 @@ 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", "@tsparticles/engine", "./Shapes/Circle/CircleShape", "./Options/Classes/Emitter", "./Emitters", "./ShapeManager", "./Shapes/Square/SquareShape", "./EmitterContainer", "./EmittersEngine", "./Enums/EmitterClickMode", "./Enums/EmitterShapeType"], factory);
21
+ define(["require", "exports", "@tsparticles/engine", "./Shapes/Circle/CircleShape.js", "./Options/Classes/Emitter.js", "./Emitters.js", "./ShapeManager.js", "./Shapes/Square/SquareShape.js", "./EmitterContainer.js", "./EmittersEngine.js", "./Enums/EmitterClickMode.js", "./Enums/EmitterShapeType.js"], factory);
22
22
  }
23
23
  })(function (require, exports) {
24
24
  "use strict";
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.loadEmittersPlugin = void 0;
27
27
  const engine_1 = require("@tsparticles/engine");
28
- const CircleShape_1 = require("./Shapes/Circle/CircleShape");
29
- const Emitter_1 = require("./Options/Classes/Emitter");
30
- const Emitters_1 = require("./Emitters");
31
- const ShapeManager_1 = require("./ShapeManager");
32
- const SquareShape_1 = require("./Shapes/Square/SquareShape");
28
+ const CircleShape_js_1 = require("./Shapes/Circle/CircleShape.js");
29
+ const Emitter_js_1 = require("./Options/Classes/Emitter.js");
30
+ const Emitters_js_1 = require("./Emitters.js");
31
+ const ShapeManager_js_1 = require("./ShapeManager.js");
32
+ const SquareShape_js_1 = require("./Shapes/Square/SquareShape.js");
33
33
  class EmittersPlugin {
34
34
  constructor(engine) {
35
35
  this._engine = engine;
36
36
  this.id = "emitters";
37
37
  }
38
38
  getPlugin(container) {
39
- return new Emitters_1.Emitters(this._engine, container);
39
+ return new Emitters_js_1.Emitters(this._engine, container);
40
40
  }
41
41
  loadOptions(options, source) {
42
42
  if (!this.needsPlugin(options) && !this.needsPlugin(source)) {
@@ -44,7 +44,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
44
44
  }
45
45
  if (source?.emitters) {
46
46
  options.emitters = (0, engine_1.executeOnSingleOrMultiple)(source.emitters, (emitter) => {
47
- const tmp = new Emitter_1.Emitter();
47
+ const tmp = new Emitter_js_1.Emitter();
48
48
  tmp.load(emitter);
49
49
  return tmp;
50
50
  });
@@ -58,7 +58,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
58
58
  enable: true,
59
59
  },
60
60
  value: interactivityEmitters.map((s) => {
61
- const tmp = new Emitter_1.Emitter();
61
+ const tmp = new Emitter_js_1.Emitter();
62
62
  tmp.load(s);
63
63
  return tmp;
64
64
  }),
@@ -74,14 +74,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
74
74
  enable: emitterMode.random.enable ?? false,
75
75
  },
76
76
  value: emitterMode.value.map((s) => {
77
- const tmp = new Emitter_1.Emitter();
77
+ const tmp = new Emitter_js_1.Emitter();
78
78
  tmp.load(s);
79
79
  return tmp;
80
80
  }),
81
81
  };
82
82
  }
83
83
  else {
84
- const tmp = new Emitter_1.Emitter();
84
+ const tmp = new Emitter_js_1.Emitter();
85
85
  tmp.load(emitterMode.value);
86
86
  options.interactivity.modes.emitters = {
87
87
  random: {
@@ -98,7 +98,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
98
98
  count: 1,
99
99
  enable: false,
100
100
  },
101
- value: new Emitter_1.Emitter(),
101
+ value: new Emitter_js_1.Emitter(),
102
102
  });
103
103
  emitterOptions.value.load(interactivityEmitters);
104
104
  }
@@ -118,7 +118,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
118
118
  }
119
119
  async function loadEmittersPlugin(engine, refresh = true) {
120
120
  if (!engine.emitterShapeManager) {
121
- engine.emitterShapeManager = new ShapeManager_1.ShapeManager(engine);
121
+ engine.emitterShapeManager = new ShapeManager_js_1.ShapeManager(engine);
122
122
  }
123
123
  if (!engine.addEmitterShape) {
124
124
  engine.addEmitterShape = (name, shape) => {
@@ -127,12 +127,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
127
127
  }
128
128
  const plugin = new EmittersPlugin(engine);
129
129
  await engine.addPlugin(plugin, refresh);
130
- engine.addEmitterShape("circle", new CircleShape_1.CircleShape());
131
- engine.addEmitterShape("square", new SquareShape_1.SquareShape());
130
+ engine.addEmitterShape("circle", new CircleShape_js_1.CircleShape());
131
+ engine.addEmitterShape("square", new SquareShape_js_1.SquareShape());
132
132
  }
133
133
  exports.loadEmittersPlugin = loadEmittersPlugin;
134
- __exportStar(require("./EmitterContainer"), exports);
135
- __exportStar(require("./EmittersEngine"), exports);
136
- __exportStar(require("./Enums/EmitterClickMode"), exports);
137
- __exportStar(require("./Enums/EmitterShapeType"), exports);
134
+ __exportStar(require("./EmitterContainer.js"), exports);
135
+ __exportStar(require("./EmittersEngine.js"), exports);
136
+ __exportStar(require("./Enums/EmitterClickMode.js"), exports);
137
+ __exportStar(require("./Enums/EmitterShapeType.js"), exports);
138
138
  });