@tsparticles/preset-fire 4.1.1 → 4.1.3

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,5 +1,5 @@
1
1
  (function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);g.tsparticlesInternalExports=g.tsparticlesInternalExports||{};})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
2
- /* Preset v4.1.1 */
2
+ /* Preset v4.1.3 */
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
5
5
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
@@ -1002,7 +1002,7 @@
1002
1002
  return this.#domArray;
1003
1003
  }
1004
1004
  get version() {
1005
- return "4.1.1";
1005
+ return "4.1.3";
1006
1006
  }
1007
1007
  addEventListener(type, listener) {
1008
1008
  this.#eventDispatcher.addEventListener(type, listener);
@@ -2795,7 +2795,7 @@
2795
2795
  }
2796
2796
 
2797
2797
  async function loadBlendPlugin(engine) {
2798
- engine.checkVersion("4.1.1");
2798
+ engine.checkVersion("4.1.3");
2799
2799
  await engine.pluginManager.register(e => {
2800
2800
  e.pluginManager.addPlugin(new BlendPlugin());
2801
2801
  });
@@ -2832,7 +2832,7 @@
2832
2832
  }
2833
2833
 
2834
2834
  async function loadCircleShape(engine) {
2835
- engine.checkVersion("4.1.1");
2835
+ engine.checkVersion("4.1.3");
2836
2836
  await engine.pluginManager.register(e => {
2837
2837
  e.pluginManager.addShape(["circle"], () => {
2838
2838
  return Promise.resolve(new CircleDrawer());
@@ -2880,7 +2880,7 @@
2880
2880
  }
2881
2881
 
2882
2882
  async function loadHexColorPlugin(engine) {
2883
- engine.checkVersion("4.1.1");
2883
+ engine.checkVersion("4.1.3");
2884
2884
  await engine.pluginManager.register(e => {
2885
2885
  e.pluginManager.addColorManager("hex", new HexColorManager());
2886
2886
  });
@@ -2933,7 +2933,7 @@
2933
2933
  }
2934
2934
 
2935
2935
  async function loadHslColorPlugin(engine) {
2936
- engine.checkVersion("4.1.1");
2936
+ engine.checkVersion("4.1.3");
2937
2937
  await engine.pluginManager.register(e => {
2938
2938
  e.pluginManager.addColorManager("hsl", new HslColorManager());
2939
2939
  });
@@ -2957,7 +2957,7 @@
2957
2957
  }
2958
2958
 
2959
2959
  async function loadMovePlugin(engine) {
2960
- engine.checkVersion("4.1.1");
2960
+ engine.checkVersion("4.1.3");
2961
2961
  await engine.pluginManager.register(e => {
2962
2962
  const moveEngine = e, movePluginManager = moveEngine.pluginManager;
2963
2963
  movePluginManager.initializers.pathGenerators ??= new Map();
@@ -3064,7 +3064,7 @@
3064
3064
  }
3065
3065
 
3066
3066
  async function loadOpacityUpdater(engine) {
3067
- engine.checkVersion("4.1.1");
3067
+ engine.checkVersion("4.1.3");
3068
3068
  await engine.pluginManager.register(e => {
3069
3069
  e.pluginManager.addParticleUpdater("opacity", container => {
3070
3070
  return Promise.resolve(new OpacityUpdater(container));
@@ -3411,7 +3411,7 @@
3411
3411
  }
3412
3412
 
3413
3413
  async function loadOutModesUpdater(engine) {
3414
- engine.checkVersion("4.1.1");
3414
+ engine.checkVersion("4.1.3");
3415
3415
  await engine.pluginManager.register(e => {
3416
3416
  e.pluginManager.addParticleUpdater("outModes", container => {
3417
3417
  return Promise.resolve(new OutOfCanvasUpdater(container));
@@ -3482,7 +3482,7 @@
3482
3482
  }
3483
3483
 
3484
3484
  async function loadPaintUpdater(engine) {
3485
- engine.checkVersion("4.1.1");
3485
+ engine.checkVersion("4.1.3");
3486
3486
  await engine.pluginManager.register(e => {
3487
3487
  e.pluginManager.addParticleUpdater("paint", container => {
3488
3488
  return Promise.resolve(new PaintUpdater(e.pluginManager, container));
@@ -3537,7 +3537,7 @@
3537
3537
  }
3538
3538
 
3539
3539
  async function loadRgbColorPlugin(engine) {
3540
- engine.checkVersion("4.1.1");
3540
+ engine.checkVersion("4.1.3");
3541
3541
  await engine.pluginManager.register(e => {
3542
3542
  e.pluginManager.addColorManager("rgb", new RgbColorManager());
3543
3543
  });
@@ -3636,7 +3636,7 @@
3636
3636
  }
3637
3637
 
3638
3638
  async function loadSizeUpdater(engine) {
3639
- engine.checkVersion("4.1.1");
3639
+ engine.checkVersion("4.1.3");
3640
3640
  await engine.pluginManager.register(e => {
3641
3641
  e.pluginManager.addParticleUpdater("size", container => {
3642
3642
  return Promise.resolve(new SizeUpdater(container));
@@ -3645,7 +3645,7 @@
3645
3645
  }
3646
3646
 
3647
3647
  async function loadBasic(engine) {
3648
- engine.checkVersion("4.1.1");
3648
+ engine.checkVersion("4.1.3");
3649
3649
  await engine.pluginManager.register(async (e) => {
3650
3650
  await Promise.all([
3651
3651
  loadBlendPlugin(e),
@@ -3883,7 +3883,7 @@
3883
3883
  const clickEvent = "click", mouseDownEvent = "pointerdown", mouseUpEvent = "pointerup", mouseLeaveEvent = "pointerleave", mouseMoveEvent = "pointermove", touchStartEvent = "touchstart", touchEndEvent = "touchend", touchMoveEvent = "touchmove", touchCancelEvent = "touchcancel";
3884
3884
 
3885
3885
  async function loadInteractivityPlugin(engine) {
3886
- engine.checkVersion("4.1.1");
3886
+ engine.checkVersion("4.1.3");
3887
3887
  await engine.pluginManager.register(e => {
3888
3888
  const interactivityEngine = e, interactivityPluginManager = interactivityEngine.pluginManager;
3889
3889
  interactivityPluginManager.addPlugin(new InteractivityPlugin(interactivityPluginManager));
@@ -3992,7 +3992,7 @@
3992
3992
  }
3993
3993
 
3994
3994
  async function loadExternalPushInteraction(engine) {
3995
- engine.checkVersion("4.1.1");
3995
+ engine.checkVersion("4.1.3");
3996
3996
  await engine.pluginManager.register((e) => {
3997
3997
  ensureInteractivityPluginLoaded(e);
3998
3998
  e.pluginManager.addInteractor?.("externalPush", container => {
@@ -4059,8 +4059,8 @@
4059
4059
  }
4060
4060
 
4061
4061
  const globalObject = globalThis;
4062
- globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
4063
4062
  globalObject.loadFirePreset = loadFirePreset;
4063
+ globalObject.tsParticles = tsParticles;
4064
4064
 
4065
4065
  const fColorIndex = 0, sColorIndex = 1;
4066
4066
  function setTransformValue(factor, newFactor, key) {
@@ -4978,19 +4978,25 @@
4978
4978
  this.shape = itemFromSingleOrMultiple(shapeType, this.id, reduceDuplicates);
4979
4979
  const effectOptions = particlesOptions.effect, shapeOptions = particlesOptions.shape;
4980
4980
  if (overrideOptions) {
4981
- if (overrideOptions.effect?.type && overrideOptions.effect.type !== this.effect) {
4982
- const overrideEffectType = overrideOptions.effect.type, effect = itemFromSingleOrMultiple(overrideEffectType, this.id, reduceDuplicates);
4983
- if (effect) {
4984
- this.effect = effect;
4985
- effectOptions.load(overrideOptions.effect);
4981
+ if (overrideOptions.effect) {
4982
+ const overrideEffectType = overrideOptions.effect.type;
4983
+ if (overrideEffectType && overrideEffectType !== this.effect) {
4984
+ const effect = itemFromSingleOrMultiple(overrideEffectType, this.id, reduceDuplicates);
4985
+ if (effect) {
4986
+ this.effect = effect;
4987
+ }
4986
4988
  }
4987
- }
4988
- if (overrideOptions.shape?.type && overrideOptions.shape.type !== this.shape) {
4989
- const overrideShapeType = overrideOptions.shape.type, shape = itemFromSingleOrMultiple(overrideShapeType, this.id, reduceDuplicates);
4990
- if (shape) {
4991
- this.shape = shape;
4992
- shapeOptions.load(overrideOptions.shape);
4989
+ effectOptions.load(overrideOptions.effect);
4990
+ }
4991
+ if (overrideOptions.shape) {
4992
+ const overrideShapeType = overrideOptions.shape.type;
4993
+ if (overrideShapeType && overrideShapeType !== this.shape) {
4994
+ const shape = itemFromSingleOrMultiple(overrideShapeType, this.id, reduceDuplicates);
4995
+ if (shape) {
4996
+ this.shape = shape;
4997
+ }
4993
4998
  }
4999
+ shapeOptions.load(overrideOptions.shape);
4994
5000
  }
4995
5001
  }
4996
5002
  if (this.effect === randomColorValue) {