@tsparticles/plugin-emitters 4.0.0-alpha.8 → 4.0.0-beta.0
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/526.min.js +1 -0
- package/588.min.js +1 -0
- package/772.min.js +1 -0
- package/784.min.js +1 -0
- package/795.min.js +1 -0
- package/803.min.js +1 -0
- package/README.md +5 -0
- package/browser/EmitterInstance.js +109 -65
- package/browser/EmitterShapeBase.js +4 -0
- package/browser/EmittersInstancesManager.js +2 -0
- package/browser/EmittersInteractor.js +5 -1
- package/browser/EmittersPlugin.js +2 -1
- package/browser/EmittersPluginInstance.js +2 -0
- package/browser/Options/Classes/Emitter.js +25 -3
- package/browser/Options/Classes/EmitterLife.js +4 -0
- package/browser/Options/Classes/EmitterRate.js +2 -0
- package/browser/Options/Classes/EmitterShape.js +3 -0
- package/browser/Options/Classes/EmitterShapeReplace.js +2 -0
- package/browser/Options/Classes/EmitterSize.js +3 -0
- package/browser/Options/Classes/EmitterSpawn.js +18 -0
- package/browser/Options/Interfaces/IEmitterSpawn.js +1 -0
- package/browser/index.js +13 -3
- package/cjs/EmitterInstance.js +109 -65
- package/cjs/EmitterShapeBase.js +4 -0
- package/cjs/EmittersInstancesManager.js +2 -0
- package/cjs/EmittersInteractor.js +5 -1
- package/cjs/EmittersPlugin.js +2 -1
- package/cjs/EmittersPluginInstance.js +2 -0
- package/cjs/Options/Classes/Emitter.js +25 -3
- package/cjs/Options/Classes/EmitterLife.js +4 -0
- package/cjs/Options/Classes/EmitterRate.js +2 -0
- package/cjs/Options/Classes/EmitterShape.js +3 -0
- package/cjs/Options/Classes/EmitterShapeReplace.js +2 -0
- package/cjs/Options/Classes/EmitterSize.js +3 -0
- package/cjs/Options/Classes/EmitterSpawn.js +18 -0
- package/cjs/Options/Interfaces/IEmitterSpawn.js +1 -0
- package/cjs/index.js +13 -3
- package/dist_browser_EmitterInstance_js.js +2 -2
- package/dist_browser_EmittersInstancesManager_js.js +18 -8
- package/dist_browser_EmittersInteractor_js.js +19 -9
- package/dist_browser_EmittersPluginInstance_js.js +2 -2
- package/dist_browser_EmittersPlugin_js.js +18 -8
- package/dist_browser_ShapeManager_js.js +2 -2
- package/esm/EmitterInstance.js +109 -65
- package/esm/EmitterShapeBase.js +4 -0
- package/esm/EmittersInstancesManager.js +2 -0
- package/esm/EmittersInteractor.js +5 -1
- package/esm/EmittersPlugin.js +2 -1
- package/esm/EmittersPluginInstance.js +2 -0
- package/esm/Options/Classes/Emitter.js +25 -3
- package/esm/Options/Classes/EmitterLife.js +4 -0
- package/esm/Options/Classes/EmitterRate.js +2 -0
- package/esm/Options/Classes/EmitterShape.js +3 -0
- package/esm/Options/Classes/EmitterShapeReplace.js +2 -0
- package/esm/Options/Classes/EmitterSize.js +3 -0
- package/esm/Options/Classes/EmitterSpawn.js +18 -0
- package/esm/Options/Interfaces/IEmitterSpawn.js +1 -0
- package/esm/index.js +13 -3
- package/package.json +3 -3
- package/report.html +1 -1
- package/tsparticles.plugin.emitters.js +44 -32
- package/tsparticles.plugin.emitters.min.js +2 -2
- package/types/EmitterInstance.d.ts +6 -1
- package/types/EmittersInteractor.d.ts +1 -0
- package/types/EmittersPlugin.d.ts +1 -1
- package/types/IEmitterShapeGenerator.d.ts +2 -2
- package/types/Options/Classes/Emitter.d.ts +4 -1
- package/types/Options/Classes/EmitterSpawn.d.ts +7 -0
- package/types/Options/Interfaces/IEmitter.d.ts +4 -1
- package/types/Options/Interfaces/IEmitterSpawn.d.ts +5 -0
- package/types/index.d.ts +1 -0
- package/umd/EmitterInstance.js +108 -64
- package/umd/EmitterShapeBase.js +4 -0
- package/umd/EmittersInstancesManager.js +2 -0
- package/umd/EmittersInteractor.js +5 -1
- package/umd/EmittersPlugin.js +2 -1
- package/umd/EmittersPluginInstance.js +2 -0
- package/umd/Options/Classes/Emitter.js +26 -4
- package/umd/Options/Classes/EmitterLife.js +4 -0
- package/umd/Options/Classes/EmitterRate.js +2 -0
- package/umd/Options/Classes/EmitterShape.js +3 -0
- package/umd/Options/Classes/EmitterShapeReplace.js +2 -0
- package/umd/Options/Classes/EmitterSize.js +3 -0
- package/umd/Options/Classes/EmitterSpawn.js +32 -0
- package/umd/Options/Interfaces/IEmitterSpawn.js +12 -0
- package/umd/index.js +14 -3
- package/129.min.js +0 -2
- package/129.min.js.LICENSE.txt +0 -1
- package/246.min.js +0 -2
- package/246.min.js.LICENSE.txt +0 -1
- package/330.min.js +0 -2
- package/330.min.js.LICENSE.txt +0 -1
- package/490.min.js +0 -2
- package/490.min.js.LICENSE.txt +0 -1
- package/849.min.js +0 -2
- package/849.min.js.LICENSE.txt +0 -1
- package/940.min.js +0 -2
- package/940.min.js.LICENSE.txt +0 -1
- package/tsparticles.plugin.emitters.min.js.LICENSE.txt +0 -1
package/esm/EmitterInstance.js
CHANGED
|
@@ -1,53 +1,54 @@
|
|
|
1
|
-
import { PixelMode, Vector, calcPositionOrRandomFromSizeRanged, deepExtend, getRangeValue, getSize, hMax, half, isPointInside, itemFromSingleOrMultiple, lMax, millisecondsToSeconds, randomInRangeValue, rangeColorToHsl, sMax, safeDocument, } from "@tsparticles/engine";
|
|
1
|
+
import { AnimatableColor, Fill, PixelMode, Stroke, Vector, calcPositionOrRandomFromSizeRanged, deepExtend, defaultOpacity, getRangeValue, getSize, hMax, half, isPointInside, itemFromSingleOrMultiple, lMax, millisecondsToSeconds, randomInRangeValue, rangeColorToHsl, sMax, safeDocument, } from "@tsparticles/engine";
|
|
2
2
|
import { Emitter } from "./Options/Classes/Emitter.js";
|
|
3
3
|
import { EmitterSize } from "./Options/Classes/EmitterSize.js";
|
|
4
|
-
const defaultLifeDelay = 0, minLifeCount = 0, defaultSpawnDelay = 0, defaultEmitDelay = 0, defaultLifeCount = -1, defaultColorAnimationFactor = 1, colorFactor = 3.6;
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
4
|
+
const defaultLifeDelay = 0, minLifeCount = 0, defaultSpawnDelay = 0, defaultEmitDelay = 0, defaultLifeCount = -1, defaultColorAnimationFactor = 1, colorFactor = 3.6, defaultStrokeWidth = 1;
|
|
5
|
+
function setParticlesOptionsFillColor(particlesOptions, color, opacity, enable) {
|
|
6
|
+
particlesOptions.fill = new Fill();
|
|
7
|
+
particlesOptions.fill.color = AnimatableColor.create(undefined, { value: color });
|
|
8
|
+
particlesOptions.fill.enable = enable;
|
|
9
|
+
particlesOptions.fill.opacity = opacity;
|
|
10
|
+
}
|
|
11
|
+
function setParticlesOptionsStrokeColor(particlesOptions, color, opacity, width) {
|
|
12
|
+
particlesOptions.stroke = new Stroke();
|
|
13
|
+
particlesOptions.stroke.color = AnimatableColor.create(undefined, { value: color });
|
|
14
|
+
particlesOptions.stroke.opacity = opacity;
|
|
15
|
+
particlesOptions.stroke.width = width;
|
|
14
16
|
}
|
|
15
17
|
export class EmitterInstance {
|
|
18
|
+
container;
|
|
19
|
+
removeCallback;
|
|
20
|
+
fill;
|
|
21
|
+
name;
|
|
22
|
+
options;
|
|
23
|
+
position;
|
|
24
|
+
size;
|
|
25
|
+
spawnFillColor;
|
|
26
|
+
spawnFillEnabled;
|
|
27
|
+
spawnFillOpacity;
|
|
28
|
+
spawnStrokeColor;
|
|
29
|
+
spawnStrokeOpacity;
|
|
30
|
+
spawnStrokeWidth;
|
|
31
|
+
_currentDuration;
|
|
32
|
+
_currentEmitDelay;
|
|
33
|
+
_currentSpawnDelay;
|
|
34
|
+
_duration;
|
|
35
|
+
_emitDelay;
|
|
36
|
+
_engine;
|
|
37
|
+
_firstSpawn;
|
|
38
|
+
_immortal;
|
|
39
|
+
_initialPosition;
|
|
40
|
+
_lifeCount;
|
|
41
|
+
_mutationObserver;
|
|
42
|
+
_particlesOptions;
|
|
43
|
+
_paused;
|
|
44
|
+
_resizeObserver;
|
|
45
|
+
_shape;
|
|
46
|
+
_size;
|
|
47
|
+
_spawnDelay;
|
|
48
|
+
_startParticlesAdded;
|
|
16
49
|
constructor(engine, container, removeCallback, options, position) {
|
|
17
50
|
this.container = container;
|
|
18
51
|
this.removeCallback = removeCallback;
|
|
19
|
-
this._destroy = () => {
|
|
20
|
-
this._mutationObserver?.disconnect();
|
|
21
|
-
this._mutationObserver = undefined;
|
|
22
|
-
this._resizeObserver?.disconnect();
|
|
23
|
-
this._resizeObserver = undefined;
|
|
24
|
-
this.removeCallback(this);
|
|
25
|
-
this._engine.dispatchEvent("emitterDestroyed", {
|
|
26
|
-
container: this.container,
|
|
27
|
-
data: {
|
|
28
|
-
emitter: this,
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
this._prepareToDie = () => {
|
|
33
|
-
if (this._paused) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
const duration = this.options.life.duration !== undefined ? getRangeValue(this.options.life.duration) : undefined, minDuration = 0, minLifeCount = 0;
|
|
37
|
-
if ((this._lifeCount > minLifeCount || this._immortal) && duration !== undefined && duration > minDuration) {
|
|
38
|
-
this._duration = duration * millisecondsToSeconds;
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
this._setColorAnimation = (animation, initValue, maxValue, factor = defaultColorAnimationFactor) => {
|
|
42
|
-
const container = this.container;
|
|
43
|
-
if (!animation.enable) {
|
|
44
|
-
return initValue;
|
|
45
|
-
}
|
|
46
|
-
const colorOffset = randomInRangeValue(animation.offset), delay = getRangeValue(this.options.rate.delay), emitFactor = container.retina.reduceFactor
|
|
47
|
-
? (delay * millisecondsToSeconds) / container.retina.reduceFactor
|
|
48
|
-
: Infinity, colorSpeed = getRangeValue(animation.speed);
|
|
49
|
-
return (initValue + (colorSpeed * container.fpsLimit) / emitFactor + colorOffset * factor) % maxValue;
|
|
50
|
-
};
|
|
51
52
|
this._engine = engine;
|
|
52
53
|
this._currentDuration = 0;
|
|
53
54
|
this._currentEmitDelay = 0;
|
|
@@ -72,8 +73,11 @@ export class EmitterInstance {
|
|
|
72
73
|
const particlesOptions = deepExtend({}, this.options.particles);
|
|
73
74
|
particlesOptions.move ??= {};
|
|
74
75
|
particlesOptions.move.direction ??= this.options.direction;
|
|
75
|
-
if (this.options.
|
|
76
|
-
this.
|
|
76
|
+
if (this.options.spawn.fill?.color) {
|
|
77
|
+
this.spawnFillColor = rangeColorToHsl(this._engine, this.options.spawn.fill.color);
|
|
78
|
+
}
|
|
79
|
+
if (this.options.spawn.stroke?.color) {
|
|
80
|
+
this.spawnStrokeColor = rangeColorToHsl(this._engine, this.options.spawn.stroke.color);
|
|
77
81
|
}
|
|
78
82
|
this._paused = !this.options.autoPlay;
|
|
79
83
|
this._particlesOptions = particlesOptions;
|
|
@@ -99,7 +103,7 @@ export class EmitterInstance {
|
|
|
99
103
|
}
|
|
100
104
|
const shapeOptions = this.options.shape, shapeGenerator = this._engine.emitterShapeManager?.getShapeGenerator(shapeOptions.type);
|
|
101
105
|
if (shapeGenerator) {
|
|
102
|
-
this._shape = shapeGenerator.generate(this.position, this.size, this.fill, shapeOptions.options);
|
|
106
|
+
this._shape = shapeGenerator.generate(this.container, this.position, this.size, this.fill, shapeOptions.options);
|
|
103
107
|
}
|
|
104
108
|
this._engine.dispatchEvent("emitterCreated", {
|
|
105
109
|
container,
|
|
@@ -201,7 +205,7 @@ export class EmitterInstance {
|
|
|
201
205
|
container: this.container,
|
|
202
206
|
});
|
|
203
207
|
this.play();
|
|
204
|
-
this._currentSpawnDelay -= this.
|
|
208
|
+
this._currentSpawnDelay -= this._spawnDelay;
|
|
205
209
|
delete this._spawnDelay;
|
|
206
210
|
}
|
|
207
211
|
}
|
|
@@ -254,6 +258,19 @@ export class EmitterInstance {
|
|
|
254
258
|
return size;
|
|
255
259
|
})());
|
|
256
260
|
}
|
|
261
|
+
_destroy = () => {
|
|
262
|
+
this._mutationObserver?.disconnect();
|
|
263
|
+
this._mutationObserver = undefined;
|
|
264
|
+
this._resizeObserver?.disconnect();
|
|
265
|
+
this._resizeObserver = undefined;
|
|
266
|
+
this.removeCallback(this);
|
|
267
|
+
this._engine.dispatchEvent("emitterDestroyed", {
|
|
268
|
+
container: this.container,
|
|
269
|
+
data: {
|
|
270
|
+
emitter: this,
|
|
271
|
+
},
|
|
272
|
+
});
|
|
273
|
+
};
|
|
257
274
|
_emit() {
|
|
258
275
|
if (this._paused) {
|
|
259
276
|
return;
|
|
@@ -263,18 +280,36 @@ export class EmitterInstance {
|
|
|
263
280
|
}
|
|
264
281
|
_emitParticles(quantity) {
|
|
265
282
|
const singleParticlesOptions = (itemFromSingleOrMultiple(this._particlesOptions) ??
|
|
266
|
-
{}),
|
|
283
|
+
{}), fillHslAnimation = this.options.spawn.fill?.color.animation, fillEnabled = this.options.spawn.fill?.enable ?? !!this.options.spawn.fill?.color, fillOpacity = this.options.spawn.fill?.opacity === undefined
|
|
284
|
+
? defaultOpacity
|
|
285
|
+
: getRangeValue(this.options.spawn.fill.opacity), strokeHslAnimation = this.options.spawn.stroke?.color?.animation, strokeOpacity = this.options.spawn.stroke?.opacity === undefined
|
|
286
|
+
? defaultOpacity
|
|
287
|
+
: getRangeValue(this.options.spawn.stroke.opacity), strokeWidth = this.options.spawn.stroke?.width === undefined
|
|
288
|
+
? defaultStrokeWidth
|
|
289
|
+
: getRangeValue(this.options.spawn.stroke.width), reduceFactor = this.container.retina.reduceFactor, needsFillColorAnimation = !!fillHslAnimation, needsStrokeColorAnimation = !!strokeHslAnimation, needsShapeData = !!this._shape, needsColorAnimation = needsFillColorAnimation || needsStrokeColorAnimation, needsCopy = needsColorAnimation || needsShapeData, maxValues = needsColorAnimation ? { h: hMax, s: sMax, l: lMax } : null, shapeOptions = this.options.shape;
|
|
267
290
|
for (let i = 0; i < quantity * reduceFactor; i++) {
|
|
268
291
|
const particlesOptions = needsCopy
|
|
269
292
|
? deepExtend({}, singleParticlesOptions)
|
|
270
293
|
: singleParticlesOptions;
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
294
|
+
this.spawnFillOpacity = fillOpacity;
|
|
295
|
+
this.spawnFillEnabled = fillEnabled;
|
|
296
|
+
this.spawnStrokeOpacity = strokeOpacity;
|
|
297
|
+
this.spawnStrokeWidth = strokeWidth;
|
|
298
|
+
if (this.spawnFillColor) {
|
|
299
|
+
if (fillHslAnimation && maxValues) {
|
|
300
|
+
this.spawnFillColor.h = this._setColorAnimation(fillHslAnimation.h, this.spawnFillColor.h, maxValues.h, colorFactor);
|
|
301
|
+
this.spawnFillColor.s = this._setColorAnimation(fillHslAnimation.s, this.spawnFillColor.s, maxValues.s);
|
|
302
|
+
this.spawnFillColor.l = this._setColorAnimation(fillHslAnimation.l, this.spawnFillColor.l, maxValues.l);
|
|
303
|
+
}
|
|
304
|
+
setParticlesOptionsFillColor(particlesOptions, this.spawnFillColor, this.spawnFillOpacity, this.spawnFillEnabled);
|
|
305
|
+
}
|
|
306
|
+
if (this.spawnStrokeColor) {
|
|
307
|
+
if (strokeHslAnimation && maxValues) {
|
|
308
|
+
this.spawnStrokeColor.h = this._setColorAnimation(strokeHslAnimation.h, this.spawnStrokeColor.h, maxValues.h, colorFactor);
|
|
309
|
+
this.spawnStrokeColor.s = this._setColorAnimation(strokeHslAnimation.s, this.spawnStrokeColor.s, maxValues.s);
|
|
310
|
+
this.spawnStrokeColor.l = this._setColorAnimation(strokeHslAnimation.l, this.spawnStrokeColor.l, maxValues.l);
|
|
276
311
|
}
|
|
277
|
-
|
|
312
|
+
setParticlesOptionsStrokeColor(particlesOptions, this.spawnStrokeColor, this.spawnStrokeOpacity, this.spawnStrokeWidth);
|
|
278
313
|
}
|
|
279
314
|
let position = this.position;
|
|
280
315
|
if (this._shape) {
|
|
@@ -283,17 +318,7 @@ export class EmitterInstance {
|
|
|
283
318
|
position = shapePosData.position;
|
|
284
319
|
const replaceData = shapeOptions.replace;
|
|
285
320
|
if (replaceData.color && shapePosData.color) {
|
|
286
|
-
|
|
287
|
-
}
|
|
288
|
-
if (replaceData.opacity) {
|
|
289
|
-
if (particlesOptions.opacity) {
|
|
290
|
-
particlesOptions.opacity.value = shapePosData.opacity;
|
|
291
|
-
}
|
|
292
|
-
else {
|
|
293
|
-
particlesOptions.opacity = {
|
|
294
|
-
value: shapePosData.opacity,
|
|
295
|
-
};
|
|
296
|
-
}
|
|
321
|
+
setParticlesOptionsFillColor(particlesOptions, shapePosData.color, replaceData.opacity ? (shapePosData.opacity ?? defaultOpacity) : defaultOpacity, true);
|
|
297
322
|
}
|
|
298
323
|
}
|
|
299
324
|
else {
|
|
@@ -305,4 +330,23 @@ export class EmitterInstance {
|
|
|
305
330
|
}
|
|
306
331
|
}
|
|
307
332
|
}
|
|
333
|
+
_prepareToDie = () => {
|
|
334
|
+
if (this._paused) {
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
const duration = this.options.life.duration !== undefined ? getRangeValue(this.options.life.duration) : undefined, minDuration = 0, minLifeCount = 0;
|
|
338
|
+
if ((this._lifeCount > minLifeCount || this._immortal) && duration !== undefined && duration > minDuration) {
|
|
339
|
+
this._duration = duration * millisecondsToSeconds;
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
_setColorAnimation = (animation, initValue, maxValue, factor = defaultColorAnimationFactor) => {
|
|
343
|
+
const container = this.container;
|
|
344
|
+
if (!animation.enable) {
|
|
345
|
+
return initValue;
|
|
346
|
+
}
|
|
347
|
+
const colorOffset = randomInRangeValue(animation.offset), delay = getRangeValue(this.options.rate.delay), emitFactor = container.retina.reduceFactor
|
|
348
|
+
? (delay * millisecondsToSeconds) / container.retina.reduceFactor
|
|
349
|
+
: Infinity, colorSpeed = getRangeValue(animation.speed);
|
|
350
|
+
return (initValue + (colorSpeed * container.fpsLimit) / emitFactor + colorOffset * factor) % maxValue;
|
|
351
|
+
};
|
|
308
352
|
}
|
package/esm/EmitterShapeBase.js
CHANGED
|
@@ -2,6 +2,8 @@ import { isNumber } from "@tsparticles/engine";
|
|
|
2
2
|
import { Emitter } from "./Options/Classes/Emitter.js";
|
|
3
3
|
const defaultIndex = 0;
|
|
4
4
|
export class EmittersInstancesManager {
|
|
5
|
+
_containerArrays;
|
|
6
|
+
_engine;
|
|
5
7
|
constructor(engine) {
|
|
6
8
|
this._containerArrays = new Map();
|
|
7
9
|
this._engine = engine;
|
|
@@ -4,9 +4,13 @@ import { Emitter } from "./Options/Classes/Emitter.js";
|
|
|
4
4
|
import { defaultRandomOptions } from "./constants.js";
|
|
5
5
|
const emittersMode = "emitters";
|
|
6
6
|
export class EmittersInteractor extends ExternalInteractorBase {
|
|
7
|
+
handleClickMode;
|
|
8
|
+
maxDistance;
|
|
9
|
+
_instancesManager;
|
|
7
10
|
constructor(instancesManager, container) {
|
|
8
11
|
super(container);
|
|
9
12
|
this._instancesManager = instancesManager;
|
|
13
|
+
this.maxDistance = 0;
|
|
10
14
|
this.handleClickMode = (mode, interactivityData) => {
|
|
11
15
|
const container = this.container, options = container.actualOptions, modeEmitters = options.interactivity.modes.emitters;
|
|
12
16
|
if (!modeEmitters || mode !== emittersMode) {
|
|
@@ -77,7 +81,7 @@ export class EmittersInteractor extends ExternalInteractorBase {
|
|
|
77
81
|
options.emitters.value.push(tmp);
|
|
78
82
|
}
|
|
79
83
|
}
|
|
80
|
-
else if (
|
|
84
|
+
else if ("value" in source.emitters) {
|
|
81
85
|
const emitterModeOptions = source.emitters;
|
|
82
86
|
options.emitters.random.enable = emitterModeOptions.random?.enable ?? options.emitters.random.enable;
|
|
83
87
|
options.emitters.random.count = emitterModeOptions.random?.count ?? options.emitters.random.count;
|
package/esm/EmittersPlugin.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { executeOnSingleOrMultiple, isArray, } from "@tsparticles/engine";
|
|
2
2
|
import { Emitter } from "./Options/Classes/Emitter.js";
|
|
3
3
|
export class EmittersPlugin {
|
|
4
|
+
id = "emitters";
|
|
5
|
+
_instancesManager;
|
|
4
6
|
constructor(instancesManager) {
|
|
5
7
|
this._instancesManager = instancesManager;
|
|
6
|
-
this.id = "emitters";
|
|
7
8
|
}
|
|
8
9
|
async getPlugin(container) {
|
|
9
10
|
const { EmittersPluginInstance } = await import("./EmittersPluginInstance.js");
|
|
@@ -3,13 +3,30 @@ import { EmitterLife } from "./EmitterLife.js";
|
|
|
3
3
|
import { EmitterRate } from "./EmitterRate.js";
|
|
4
4
|
import { EmitterShape } from "./EmitterShape.js";
|
|
5
5
|
import { EmitterSize } from "./EmitterSize.js";
|
|
6
|
+
import { EmitterSpawn } from "./EmitterSpawn.js";
|
|
6
7
|
export class Emitter {
|
|
8
|
+
autoPlay;
|
|
9
|
+
direction;
|
|
10
|
+
domId;
|
|
11
|
+
fill;
|
|
12
|
+
life;
|
|
13
|
+
name;
|
|
14
|
+
particles;
|
|
15
|
+
position;
|
|
16
|
+
rate;
|
|
17
|
+
shape;
|
|
18
|
+
size;
|
|
19
|
+
spawn;
|
|
20
|
+
spawnFillColor;
|
|
21
|
+
spawnStrokeColor;
|
|
22
|
+
startCount;
|
|
7
23
|
constructor() {
|
|
8
24
|
this.autoPlay = true;
|
|
9
25
|
this.fill = true;
|
|
10
26
|
this.life = new EmitterLife();
|
|
11
27
|
this.rate = new EmitterRate();
|
|
12
28
|
this.shape = new EmitterShape();
|
|
29
|
+
this.spawn = new EmitterSpawn();
|
|
13
30
|
this.startCount = 0;
|
|
14
31
|
}
|
|
15
32
|
load(data) {
|
|
@@ -37,6 +54,7 @@ export class Emitter {
|
|
|
37
54
|
});
|
|
38
55
|
this.rate.load(data.rate);
|
|
39
56
|
this.shape.load(data.shape);
|
|
57
|
+
this.spawn.load(data.spawn);
|
|
40
58
|
if (data.position !== undefined) {
|
|
41
59
|
this.position = {};
|
|
42
60
|
if (data.position.x !== undefined) {
|
|
@@ -46,9 +64,13 @@ export class Emitter {
|
|
|
46
64
|
this.position.y = setRangeValue(data.position.y);
|
|
47
65
|
}
|
|
48
66
|
}
|
|
49
|
-
if (data.
|
|
50
|
-
this.
|
|
51
|
-
this.
|
|
67
|
+
if (data.spawnFillColor !== undefined) {
|
|
68
|
+
this.spawnFillColor ??= new AnimatableColor();
|
|
69
|
+
this.spawnFillColor.load(data.spawnFillColor);
|
|
70
|
+
}
|
|
71
|
+
if (data.spawnStrokeColor !== undefined) {
|
|
72
|
+
this.spawnStrokeColor ??= new AnimatableColor();
|
|
73
|
+
this.spawnStrokeColor.load(data.spawnStrokeColor);
|
|
52
74
|
}
|
|
53
75
|
if (data.startCount !== undefined) {
|
|
54
76
|
this.startCount = data.startCount;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { deepExtend, isNull } from "@tsparticles/engine";
|
|
2
2
|
import { EmitterShapeReplace } from "./EmitterShapeReplace.js";
|
|
3
3
|
export class EmitterShape {
|
|
4
|
+
options;
|
|
5
|
+
replace;
|
|
6
|
+
type;
|
|
4
7
|
constructor() {
|
|
5
8
|
this.options = {};
|
|
6
9
|
this.replace = new EmitterShapeReplace();
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Fill, Stroke, isNull } from "@tsparticles/engine";
|
|
2
|
+
export class EmitterSpawn {
|
|
3
|
+
fill;
|
|
4
|
+
stroke;
|
|
5
|
+
load(data) {
|
|
6
|
+
if (isNull(data)) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
if (data.fill) {
|
|
10
|
+
this.fill ??= new Fill();
|
|
11
|
+
this.fill.load(data.fill);
|
|
12
|
+
}
|
|
13
|
+
if (data.stroke) {
|
|
14
|
+
this.stroke ??= new Stroke();
|
|
15
|
+
this.stroke.load(data.stroke);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/esm/index.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
export async function loadEmittersPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-
|
|
2
|
+
engine.checkVersion("4.0.0-beta.0");
|
|
3
3
|
await engine.register(async (e) => {
|
|
4
|
-
const {
|
|
5
|
-
|
|
4
|
+
const [{ ensureInteractivityPluginLoaded }, { ShapeManager }, { EmittersInstancesManager }, { EmittersPlugin },] = await Promise.all([
|
|
5
|
+
import("@tsparticles/plugin-interactivity"),
|
|
6
|
+
import("./ShapeManager.js"),
|
|
7
|
+
import("./EmittersInstancesManager.js"),
|
|
8
|
+
import("./EmittersPlugin.js"),
|
|
9
|
+
]), instancesManager = new EmittersInstancesManager(e);
|
|
10
|
+
ensureInteractivityPluginLoaded(e);
|
|
6
11
|
e.emitterShapeManager ??= new ShapeManager();
|
|
7
12
|
e.addEmitterShapeGenerator ??= (name, generator) => {
|
|
8
13
|
e.emitterShapeManager?.addShapeGenerator(name, generator);
|
|
@@ -14,5 +19,10 @@ export async function loadEmittersPlugin(engine) {
|
|
|
14
19
|
});
|
|
15
20
|
});
|
|
16
21
|
}
|
|
22
|
+
export function ensureEmittersPluginLoaded(e) {
|
|
23
|
+
if (!e.addEmitterShapeGenerator) {
|
|
24
|
+
throw new Error("tsParticles Emitters Plugin is not loaded");
|
|
25
|
+
}
|
|
26
|
+
}
|
|
17
27
|
export * from "./EmitterShapeBase.js";
|
|
18
28
|
export * from "./Enums/EmitterClickMode.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/plugin-emitters",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-beta.0",
|
|
4
4
|
"description": "tsParticles emitters plugin",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -86,8 +86,8 @@
|
|
|
86
86
|
"./package.json": "./package.json"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@tsparticles/engine": "4.0.0-
|
|
90
|
-
"@tsparticles/plugin-interactivity": "4.0.0-
|
|
89
|
+
"@tsparticles/engine": "4.0.0-beta.0",
|
|
90
|
+
"@tsparticles/plugin-interactivity": "4.0.0-beta.0"
|
|
91
91
|
},
|
|
92
92
|
"publishConfig": {
|
|
93
93
|
"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 [
|
|
6
|
+
<title>@tsparticles/plugin-emitters [19 Mar 2026 at 14:00]</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>
|
|
@@ -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-
|
|
7
|
+
* v4.0.0-beta.0
|
|
8
8
|
*/
|
|
9
9
|
/*
|
|
10
10
|
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
@@ -28,13 +28,33 @@ return /******/ (() => { // webpackBootstrap
|
|
|
28
28
|
/******/ "use strict";
|
|
29
29
|
/******/ var __webpack_modules__ = ({
|
|
30
30
|
|
|
31
|
+
/***/ "@tsparticles/engine"
|
|
32
|
+
/*!*********************************************************************************************************************************!*\
|
|
33
|
+
!*** external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"} ***!
|
|
34
|
+
\*********************************************************************************************************************************/
|
|
35
|
+
(module) {
|
|
36
|
+
|
|
37
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
38
|
+
|
|
39
|
+
/***/ },
|
|
40
|
+
|
|
41
|
+
/***/ "@tsparticles/plugin-interactivity"
|
|
42
|
+
/*!***************************************************************************************************************************************************************************!*\
|
|
43
|
+
!*** external {"commonjs":"@tsparticles/plugin-interactivity","commonjs2":"@tsparticles/plugin-interactivity","amd":"@tsparticles/plugin-interactivity","root":"window"} ***!
|
|
44
|
+
\***************************************************************************************************************************************************************************/
|
|
45
|
+
(module) {
|
|
46
|
+
|
|
47
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_interactivity__;
|
|
48
|
+
|
|
49
|
+
/***/ },
|
|
50
|
+
|
|
31
51
|
/***/ "./dist/browser/EmitterShapeBase.js"
|
|
32
52
|
/*!******************************************!*\
|
|
33
53
|
!*** ./dist/browser/EmitterShapeBase.js ***!
|
|
34
54
|
\******************************************/
|
|
35
55
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
36
56
|
|
|
37
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ EmitterShapeBase: () => (/* binding */ EmitterShapeBase)\n/* harmony export */ });\nclass EmitterShapeBase {\n
|
|
57
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ EmitterShapeBase: () => (/* binding */ EmitterShapeBase)\n/* harmony export */ });\nclass EmitterShapeBase {\n fill;\n options;\n position;\n size;\n constructor(position, size, fill, options){\n this.position = position;\n this.size = size;\n this.fill = fill;\n this.options = options;\n }\n resize(position, size) {\n this.position = position;\n this.size = size;\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/plugin-emitters/./dist/browser/EmitterShapeBase.js?\n}");
|
|
38
58
|
|
|
39
59
|
/***/ },
|
|
40
60
|
|
|
@@ -44,7 +64,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
44
64
|
\************************************************/
|
|
45
65
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
46
66
|
|
|
47
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ EmitterClickMode: () => (/* binding */ EmitterClickMode)\n/* harmony export */ });\nvar EmitterClickMode;\n(function
|
|
67
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ EmitterClickMode: () => (/* binding */ EmitterClickMode)\n/* harmony export */ });\nvar EmitterClickMode;\n(function(EmitterClickMode) {\n EmitterClickMode[\"emitter\"] = \"emitter\";\n})(EmitterClickMode || (EmitterClickMode = {}));\n\n\n//# sourceURL=webpack://@tsparticles/plugin-emitters/./dist/browser/Enums/EmitterClickMode.js?\n}");
|
|
48
68
|
|
|
49
69
|
/***/ },
|
|
50
70
|
|
|
@@ -54,27 +74,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
54
74
|
\*******************************/
|
|
55
75
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
56
76
|
|
|
57
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ EmitterClickMode: () => (/* reexport safe */ _Enums_EmitterClickMode_js__WEBPACK_IMPORTED_MODULE_1__.EmitterClickMode),\n/* harmony export */ EmitterShapeBase: () => (/* reexport safe */ _EmitterShapeBase_js__WEBPACK_IMPORTED_MODULE_0__.EmitterShapeBase),\n/* harmony export */ loadEmittersPlugin: () => (/* binding */ loadEmittersPlugin)\n/* harmony export */ });\n/* harmony import */ var _EmitterShapeBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./EmitterShapeBase.js */ \"./dist/browser/EmitterShapeBase.js\");\n/* harmony import */ var _Enums_EmitterClickMode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Enums/EmitterClickMode.js */ \"./dist/browser/Enums/EmitterClickMode.js\");\nasync function loadEmittersPlugin(engine) {\n
|
|
58
|
-
|
|
59
|
-
/***/ },
|
|
60
|
-
|
|
61
|
-
/***/ "@tsparticles/engine"
|
|
62
|
-
/*!*********************************************************************************************************************************!*\
|
|
63
|
-
!*** external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"} ***!
|
|
64
|
-
\*********************************************************************************************************************************/
|
|
65
|
-
(module) {
|
|
66
|
-
|
|
67
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
68
|
-
|
|
69
|
-
/***/ },
|
|
70
|
-
|
|
71
|
-
/***/ "@tsparticles/plugin-interactivity"
|
|
72
|
-
/*!***************************************************************************************************************************************************************************!*\
|
|
73
|
-
!*** external {"commonjs":"@tsparticles/plugin-interactivity","commonjs2":"@tsparticles/plugin-interactivity","amd":"@tsparticles/plugin-interactivity","root":"window"} ***!
|
|
74
|
-
\***************************************************************************************************************************************************************************/
|
|
75
|
-
(module) {
|
|
76
|
-
|
|
77
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_interactivity__;
|
|
77
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ EmitterClickMode: () => (/* reexport safe */ _Enums_EmitterClickMode_js__WEBPACK_IMPORTED_MODULE_1__.EmitterClickMode),\n/* harmony export */ EmitterShapeBase: () => (/* reexport safe */ _EmitterShapeBase_js__WEBPACK_IMPORTED_MODULE_0__.EmitterShapeBase),\n/* harmony export */ ensureEmittersPluginLoaded: () => (/* binding */ ensureEmittersPluginLoaded),\n/* harmony export */ loadEmittersPlugin: () => (/* binding */ loadEmittersPlugin)\n/* harmony export */ });\n/* harmony import */ var _EmitterShapeBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./EmitterShapeBase.js */ \"./dist/browser/EmitterShapeBase.js\");\n/* harmony import */ var _Enums_EmitterClickMode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Enums/EmitterClickMode.js */ \"./dist/browser/Enums/EmitterClickMode.js\");\nasync function loadEmittersPlugin(engine) {\n engine.checkVersion(\"4.0.0-beta.0\");\n await engine.register(async (e)=>{\n const [{ ensureInteractivityPluginLoaded }, { ShapeManager }, { EmittersInstancesManager }, { EmittersPlugin }] = await Promise.all([\n Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-interactivity */ \"@tsparticles/plugin-interactivity\", 19)),\n __webpack_require__.e(/*! import() */ \"dist_browser_ShapeManager_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./ShapeManager.js */ \"./dist/browser/ShapeManager.js\")),\n __webpack_require__.e(/*! import() */ \"dist_browser_EmittersInstancesManager_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./EmittersInstancesManager.js */ \"./dist/browser/EmittersInstancesManager.js\")),\n __webpack_require__.e(/*! import() */ \"dist_browser_EmittersPlugin_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./EmittersPlugin.js */ \"./dist/browser/EmittersPlugin.js\"))\n ]), instancesManager = new EmittersInstancesManager(e);\n ensureInteractivityPluginLoaded(e);\n e.emitterShapeManager ??= new ShapeManager();\n e.addEmitterShapeGenerator ??= (name, generator)=>{\n e.emitterShapeManager?.addShapeGenerator(name, generator);\n };\n e.addPlugin(new EmittersPlugin(instancesManager));\n e.addInteractor?.(\"externalEmitters\", async (container)=>{\n const { EmittersInteractor } = await __webpack_require__.e(/*! import() */ \"dist_browser_EmittersInteractor_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./EmittersInteractor.js */ \"./dist/browser/EmittersInteractor.js\"));\n return new EmittersInteractor(instancesManager, container);\n });\n });\n}\nfunction ensureEmittersPluginLoaded(e) {\n if (!e.addEmitterShapeGenerator) {\n throw new Error(\"tsParticles Emitters Plugin is not loaded\");\n }\n}\n\n\n\n\n//# sourceURL=webpack://@tsparticles/plugin-emitters/./dist/browser/index.js?\n}");
|
|
78
78
|
|
|
79
79
|
/***/ }
|
|
80
80
|
|
|
@@ -90,12 +90,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_interactivity__;
|
|
|
90
90
|
/******/ if (cachedModule !== undefined) {
|
|
91
91
|
/******/ return cachedModule.exports;
|
|
92
92
|
/******/ }
|
|
93
|
-
/******/ // Check if module exists (development only)
|
|
94
|
-
/******/ if (__webpack_modules__[moduleId] === undefined) {
|
|
95
|
-
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
96
|
-
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
97
|
-
/******/ throw e;
|
|
98
|
-
/******/ }
|
|
99
93
|
/******/ // Create a new module (and put it into the cache)
|
|
100
94
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
101
95
|
/******/ // no module.id needed
|
|
@@ -104,6 +98,12 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_interactivity__;
|
|
|
104
98
|
/******/ };
|
|
105
99
|
/******/
|
|
106
100
|
/******/ // Execute the module function
|
|
101
|
+
/******/ if (!(moduleId in __webpack_modules__)) {
|
|
102
|
+
/******/ delete __webpack_module_cache__[moduleId];
|
|
103
|
+
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
104
|
+
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
105
|
+
/******/ throw e;
|
|
106
|
+
/******/ }
|
|
107
107
|
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
108
108
|
/******/
|
|
109
109
|
/******/ // Return the exports of the module
|
|
@@ -178,6 +178,18 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_interactivity__;
|
|
|
178
178
|
/******/ };
|
|
179
179
|
/******/ })();
|
|
180
180
|
/******/
|
|
181
|
+
/******/ /* webpack/runtime/global */
|
|
182
|
+
/******/ (() => {
|
|
183
|
+
/******/ __webpack_require__.g = (function() {
|
|
184
|
+
/******/ if (typeof globalThis === 'object') return globalThis;
|
|
185
|
+
/******/ try {
|
|
186
|
+
/******/ return this || new Function('return this')();
|
|
187
|
+
/******/ } catch (e) {
|
|
188
|
+
/******/ if (typeof window === 'object') return window;
|
|
189
|
+
/******/ }
|
|
190
|
+
/******/ })();
|
|
191
|
+
/******/ })();
|
|
192
|
+
/******/
|
|
181
193
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
182
194
|
/******/ (() => {
|
|
183
195
|
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
@@ -242,8 +254,8 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_interactivity__;
|
|
|
242
254
|
/******/ /* webpack/runtime/publicPath */
|
|
243
255
|
/******/ (() => {
|
|
244
256
|
/******/ var scriptUrl;
|
|
245
|
-
/******/ if (
|
|
246
|
-
/******/ var document =
|
|
257
|
+
/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
|
|
258
|
+
/******/ var document = __webpack_require__.g.document;
|
|
247
259
|
/******/ if (!scriptUrl && document) {
|
|
248
260
|
/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')
|
|
249
261
|
/******/ scriptUrl = document.currentScript.src;
|