@tsparticles/particles 4.3.1 → 4.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
- /* tsParticles v4.3.1 */
2
+ /* tsParticles v4.3.2 */
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) :
@@ -332,6 +332,9 @@
332
332
  })(exports.PixelMode || (exports.PixelMode = {}));
333
333
 
334
334
  const minRadius = 0;
335
+ function isForbiddenKey(key) {
336
+ return key === "__proto__" || key === "constructor" || key === "prototype";
337
+ }
335
338
  function hasMatchMedia() {
336
339
  return typeof matchMedia !== "undefined";
337
340
  }
@@ -407,7 +410,7 @@
407
410
  if (!hasNested) {
408
411
  const sourceDict = source, destDict = destination;
409
412
  for (const key of sourceKeys) {
410
- if (key === "__proto__" || key === "constructor" || key === "prototype") {
413
+ if (isForbiddenKey(key)) {
411
414
  continue;
412
415
  }
413
416
  const v = sourceDict[key];
@@ -418,7 +421,7 @@
418
421
  continue;
419
422
  }
420
423
  for (const key of sourceKeys) {
421
- if (key === "__proto__" || key === "constructor" || key === "prototype") {
424
+ if (isForbiddenKey(key)) {
422
425
  continue;
423
426
  }
424
427
  const sourceDict = source, destDict = destination, value = sourceDict[key];
@@ -877,7 +880,7 @@
877
880
  return this.#domArray;
878
881
  }
879
882
  get version() {
880
- return "4.3.1";
883
+ return "4.3.2";
881
884
  }
882
885
  addEventListener(type, listener) {
883
886
  this.#eventDispatcher.addEventListener(type, listener);
@@ -1160,7 +1163,12 @@
1160
1163
  }
1161
1164
  function loadExtendProperty(obj, key, value) {
1162
1165
  if (value !== undefined) {
1163
- obj[key] = deepExtend(obj[key] ?? {}, value);
1166
+ const keyStr = key;
1167
+ if (keyStr === "__proto__" || keyStr === "constructor" || keyStr === "prototype") {
1168
+ return;
1169
+ }
1170
+ const objRecord = obj, currentValue = Object.prototype.hasOwnProperty.call(objRecord, keyStr) ? objRecord[keyStr] : {};
1171
+ objRecord[keyStr] = deepExtend(currentValue, value);
1164
1172
  }
1165
1173
  }
1166
1174
  function loadOptionProperty(obj, key, optionClass, ...sources) {
@@ -2319,7 +2327,7 @@
2319
2327
  }
2320
2328
 
2321
2329
  async function loadBlendPlugin(engine) {
2322
- engine.checkVersion("4.3.1");
2330
+ engine.checkVersion("4.3.2");
2323
2331
  await engine.pluginManager.register(e => {
2324
2332
  e.pluginManager.addPlugin(new BlendPlugin());
2325
2333
  });
@@ -2356,7 +2364,7 @@
2356
2364
  }
2357
2365
 
2358
2366
  async function loadCircleShape(engine) {
2359
- engine.checkVersion("4.3.1");
2367
+ engine.checkVersion("4.3.2");
2360
2368
  await engine.pluginManager.register(e => {
2361
2369
  e.pluginManager.addShape(["circle"], () => {
2362
2370
  return Promise.resolve(new CircleDrawer());
@@ -2404,7 +2412,7 @@
2404
2412
  }
2405
2413
 
2406
2414
  async function loadHexColorPlugin(engine) {
2407
- engine.checkVersion("4.3.1");
2415
+ engine.checkVersion("4.3.2");
2408
2416
  await engine.pluginManager.register(e => {
2409
2417
  e.pluginManager.addColorManager("hex", new HexColorManager());
2410
2418
  });
@@ -2457,7 +2465,7 @@
2457
2465
  }
2458
2466
 
2459
2467
  async function loadHslColorPlugin(engine) {
2460
- engine.checkVersion("4.3.1");
2468
+ engine.checkVersion("4.3.2");
2461
2469
  await engine.pluginManager.register(e => {
2462
2470
  e.pluginManager.addColorManager("hsl", new HslColorManager());
2463
2471
  });
@@ -2481,7 +2489,7 @@
2481
2489
  }
2482
2490
 
2483
2491
  async function loadMovePlugin(engine) {
2484
- engine.checkVersion("4.3.1");
2492
+ engine.checkVersion("4.3.2");
2485
2493
  await engine.pluginManager.register(e => {
2486
2494
  const moveEngine = e, movePluginManager = moveEngine.pluginManager;
2487
2495
  movePluginManager.initializers.pathGenerators ??= new Map();
@@ -2691,7 +2699,7 @@
2691
2699
  }
2692
2700
 
2693
2701
  async function loadOpacityUpdater(engine) {
2694
- engine.checkVersion("4.3.1");
2702
+ engine.checkVersion("4.3.2");
2695
2703
  await engine.pluginManager.register(e => {
2696
2704
  e.pluginManager.addParticleUpdater("opacity", container => {
2697
2705
  return Promise.resolve(new OpacityUpdater(container));
@@ -3036,7 +3044,7 @@
3036
3044
  }
3037
3045
 
3038
3046
  async function loadOutModesUpdater(engine) {
3039
- engine.checkVersion("4.3.1");
3047
+ engine.checkVersion("4.3.2");
3040
3048
  await engine.pluginManager.register(e => {
3041
3049
  e.pluginManager.addParticleUpdater("outModes", container => {
3042
3050
  return Promise.resolve(new OutOfCanvasUpdater(container));
@@ -3107,7 +3115,7 @@
3107
3115
  }
3108
3116
 
3109
3117
  async function loadPaintUpdater(engine) {
3110
- engine.checkVersion("4.3.1");
3118
+ engine.checkVersion("4.3.2");
3111
3119
  await engine.pluginManager.register(e => {
3112
3120
  e.pluginManager.addParticleUpdater("paint", container => {
3113
3121
  return Promise.resolve(new PaintUpdater(e.pluginManager, container));
@@ -3162,7 +3170,7 @@
3162
3170
  }
3163
3171
 
3164
3172
  async function loadRgbColorPlugin(engine) {
3165
- engine.checkVersion("4.3.1");
3173
+ engine.checkVersion("4.3.2");
3166
3174
  await engine.pluginManager.register(e => {
3167
3175
  e.pluginManager.addColorManager("rgb", new RgbColorManager());
3168
3176
  });
@@ -3247,7 +3255,7 @@
3247
3255
  }
3248
3256
 
3249
3257
  async function loadSizeUpdater(engine) {
3250
- engine.checkVersion("4.3.1");
3258
+ engine.checkVersion("4.3.2");
3251
3259
  await engine.pluginManager.register(e => {
3252
3260
  e.pluginManager.addParticleUpdater("size", container => {
3253
3261
  return Promise.resolve(new SizeUpdater(container));
@@ -3256,7 +3264,7 @@
3256
3264
  }
3257
3265
 
3258
3266
  async function loadBasic(engine) {
3259
- engine.checkVersion("4.3.1");
3267
+ engine.checkVersion("4.3.2");
3260
3268
  await engine.pluginManager.register(async (e) => {
3261
3269
  await Promise.all([
3262
3270
  loadBlendPlugin(e),
@@ -3457,7 +3465,7 @@
3457
3465
  const clickEvent = "click", mouseDownEvent = "pointerdown", mouseUpEvent = "pointerup", mouseLeaveEvent = "pointerleave", mouseMoveEvent = "pointermove", touchStartEvent = "touchstart", touchEndEvent = "touchend", touchMoveEvent = "touchmove", touchCancelEvent = "touchcancel";
3458
3466
 
3459
3467
  async function loadInteractivityPlugin(engine) {
3460
- engine.checkVersion("4.3.1");
3468
+ engine.checkVersion("4.3.2");
3461
3469
  await engine.pluginManager.register(e => {
3462
3470
  const interactivityEngine = e, interactivityPluginManager = interactivityEngine.pluginManager;
3463
3471
  interactivityPluginManager.addPlugin(new InteractivityPlugin(interactivityPluginManager));
@@ -3691,7 +3699,7 @@
3691
3699
  }
3692
3700
 
3693
3701
  async function loadParticlesCollisionsInteraction(engine) {
3694
- engine.checkVersion("4.3.1");
3702
+ engine.checkVersion("4.3.2");
3695
3703
  await engine.pluginManager.register((e) => {
3696
3704
  ensureInteractivityPluginLoaded(e);
3697
3705
  e.pluginManager.addPlugin(new OverlapPlugin());
@@ -3945,7 +3953,7 @@
3945
3953
  }
3946
3954
 
3947
3955
  async function loadParticlesLinksInteraction(engine) {
3948
- engine.checkVersion("4.3.1");
3956
+ engine.checkVersion("4.3.2");
3949
3957
  await engine.pluginManager.register((e) => {
3950
3958
  const pluginManager = e.pluginManager;
3951
3959
  ensureInteractivityPluginLoaded(e);
@@ -3958,7 +3966,7 @@
3958
3966
 
3959
3967
  let initPromise = null;
3960
3968
  async function doInitPlugins(engine) {
3961
- engine.checkVersion("4.3.1");
3969
+ engine.checkVersion("4.3.2");
3962
3970
  await engine.pluginManager.register(async (e) => {
3963
3971
  const loadParticlesInteractivity = async (e) => {
3964
3972
  await loadInteractivityPlugin(e);
@@ -4001,7 +4009,7 @@
4001
4009
  particles.init = async () => {
4002
4010
  await initPlugins(tsParticles);
4003
4011
  };
4004
- particles.version = "4.3.1";
4012
+ particles.version = "4.3.2";
4005
4013
  globalThis.particles = particles;
4006
4014
 
4007
4015
  const globalObject = globalThis;