@tsparticles/all 3.0.0-beta.4 → 3.0.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.
@@ -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.4
7
+ * v3.0.0
8
8
  */
9
9
  (function webpackUniversalModuleDefinition(root, factory) {
10
10
  if(typeof exports === 'object' && typeof module === 'object')
@@ -1227,7 +1227,8 @@ function drawParticle(data) {
1227
1227
  particle,
1228
1228
  radius,
1229
1229
  opacity,
1230
- delta
1230
+ delta,
1231
+ transformData
1231
1232
  };
1232
1233
  context.beginPath();
1233
1234
  drawShape(drawData);
@@ -1252,7 +1253,8 @@ function drawEffect(data) {
1252
1253
  particle,
1253
1254
  radius,
1254
1255
  opacity,
1255
- delta
1256
+ delta,
1257
+ transformData
1256
1258
  } = data;
1257
1259
  if (!particle.effect) {
1258
1260
  return;
@@ -1267,7 +1269,10 @@ function drawEffect(data) {
1267
1269
  radius,
1268
1270
  opacity,
1269
1271
  delta,
1270
- pixelRatio: container.retina.pixelRatio
1272
+ pixelRatio: container.retina.pixelRatio,
1273
+ transformData: {
1274
+ ...transformData
1275
+ }
1271
1276
  });
1272
1277
  }
1273
1278
  function drawShape(data) {
@@ -1277,7 +1282,8 @@ function drawShape(data) {
1277
1282
  particle,
1278
1283
  radius,
1279
1284
  opacity,
1280
- delta
1285
+ delta,
1286
+ transformData
1281
1287
  } = data;
1282
1288
  if (!particle.shape) {
1283
1289
  return;
@@ -1292,7 +1298,10 @@ function drawShape(data) {
1292
1298
  radius,
1293
1299
  opacity,
1294
1300
  delta,
1295
- pixelRatio: container.retina.pixelRatio
1301
+ pixelRatio: container.retina.pixelRatio,
1302
+ transformData: {
1303
+ ...transformData
1304
+ }
1296
1305
  });
1297
1306
  }
1298
1307
  function drawShapeAfterDraw(data) {
@@ -1302,7 +1311,8 @@ function drawShapeAfterDraw(data) {
1302
1311
  particle,
1303
1312
  radius,
1304
1313
  opacity,
1305
- delta
1314
+ delta,
1315
+ transformData
1306
1316
  } = data;
1307
1317
  if (!particle.shape) {
1308
1318
  return;
@@ -1317,7 +1327,10 @@ function drawShapeAfterDraw(data) {
1317
1327
  radius,
1318
1328
  opacity,
1319
1329
  delta,
1320
- pixelRatio: container.retina.pixelRatio
1330
+ pixelRatio: container.retina.pixelRatio,
1331
+ transformData: {
1332
+ ...transformData
1333
+ }
1321
1334
  });
1322
1335
  }
1323
1336
  function drawPlugin(context, plugin, delta) {
@@ -1554,7 +1567,7 @@ class Canvas {
1554
1567
  } else if (trailFill.image) {
1555
1568
  this._paintImage(trailFill.image, trailFill.opacity);
1556
1569
  }
1557
- } else {
1570
+ } else if (options.clear) {
1558
1571
  this.draw(ctx => {
1559
1572
  clear(ctx, this.size);
1560
1573
  });
@@ -2401,11 +2414,7 @@ class Events {
2401
2414
  });
2402
2415
  }
2403
2416
  this.onHover.load(data.onHover);
2404
- if (isBoolean(data.resize)) {
2405
- this.resize.enable = data.resize;
2406
- } else {
2407
- this.resize.load(data.resize);
2408
- }
2417
+ this.resize.load(data.resize);
2409
2418
  }
2410
2419
  }
2411
2420
  ;// CONCATENATED MODULE: ../../engine/dist/browser/Options/Classes/Interactivity/Modes/Modes.js
@@ -3430,23 +3439,26 @@ class ParticlesOptions {
3430
3439
  if (!data) {
3431
3440
  return;
3432
3441
  }
3433
- this.bounce.load(data.bounce);
3434
- this.color.load(AnimatableColor.create(this.color, data.color));
3435
- this.effect.load(data.effect);
3436
3442
  if (data.groups !== undefined) {
3437
- for (const group in data.groups) {
3443
+ for (const group of Object.keys(data.groups)) {
3444
+ if (!Object.hasOwn(data.groups, group)) {
3445
+ continue;
3446
+ }
3438
3447
  const item = data.groups[group];
3439
3448
  if (item !== undefined) {
3440
3449
  this.groups[group] = deepExtend(this.groups[group] ?? {}, item);
3441
3450
  }
3442
3451
  }
3443
3452
  }
3444
- this.move.load(data.move);
3445
- this.number.load(data.number);
3446
- this.opacity.load(data.opacity);
3447
3453
  if (data.reduceDuplicates !== undefined) {
3448
3454
  this.reduceDuplicates = data.reduceDuplicates;
3449
3455
  }
3456
+ this.bounce.load(data.bounce);
3457
+ this.color.load(AnimatableColor.create(this.color, data.color));
3458
+ this.effect.load(data.effect);
3459
+ this.move.load(data.move);
3460
+ this.number.load(data.number);
3461
+ this.opacity.load(data.opacity);
3450
3462
  this.shape.load(data.shape);
3451
3463
  this.size.load(data.size);
3452
3464
  this.shadow.load(data.shadow);
@@ -3519,6 +3531,7 @@ class Options {
3519
3531
  this.autoPlay = true;
3520
3532
  this.background = new Background();
3521
3533
  this.backgroundMask = new BackgroundMask();
3534
+ this.clear = true;
3522
3535
  this.defaultThemes = {};
3523
3536
  this.delay = 0;
3524
3537
  this.fullScreen = new FullScreen();
@@ -3546,6 +3559,12 @@ class Options {
3546
3559
  if (data.autoPlay !== undefined) {
3547
3560
  this.autoPlay = data.autoPlay;
3548
3561
  }
3562
+ if (data.clear !== undefined) {
3563
+ this.clear = data.clear;
3564
+ }
3565
+ if (data.name !== undefined) {
3566
+ this.name = data.name;
3567
+ }
3549
3568
  if (data.delay !== undefined) {
3550
3569
  this.delay = setRangeValue(data.delay);
3551
3570
  }
@@ -3871,7 +3890,9 @@ class Particle {
3871
3890
  this.bubble.inRange = false;
3872
3891
  this.slow.inRange = false;
3873
3892
  const container = this.container,
3874
- pathGenerator = this.pathGenerator;
3893
+ pathGenerator = this.pathGenerator,
3894
+ shapeDrawer = container.shapeDrawers.get(this.shape);
3895
+ shapeDrawer && shapeDrawer.particleDestroy && shapeDrawer.particleDestroy(this);
3875
3896
  for (const [, plugin] of container.plugins) {
3876
3897
  plugin.particleDestroyed && plugin.particleDestroyed(this, override);
3877
3898
  }
@@ -5125,7 +5146,7 @@ class Engine {
5125
5146
  return res;
5126
5147
  }
5127
5148
  get version() {
5128
- return "3.0.0-beta.4";
5149
+ return "3.0.0";
5129
5150
  }
5130
5151
  addConfig(config) {
5131
5152
  const name = config.name ?? "default";
@@ -5536,6 +5557,377 @@ if (!isSsr()) {
5536
5557
 
5537
5558
 
5538
5559
 
5560
+ ;// CONCATENATED MODULE: ../pjs/dist/browser/marcbruederlin/Particles.js
5561
+
5562
+ class Particles_Particles {
5563
+ static init(options) {
5564
+ const particles = new Particles_Particles(),
5565
+ selector = options.selector;
5566
+ if (!selector) {
5567
+ throw new Error("No selector provided");
5568
+ }
5569
+ const el = document.querySelector(selector);
5570
+ if (!el) {
5571
+ throw new Error("No element found for selector");
5572
+ }
5573
+ tsParticles.load({
5574
+ id: selector.replace(".", "").replace("!", ""),
5575
+ element: el,
5576
+ options: {
5577
+ fullScreen: {
5578
+ enable: false
5579
+ },
5580
+ particles: {
5581
+ color: {
5582
+ value: options.color ?? "!000000"
5583
+ },
5584
+ links: {
5585
+ color: "random",
5586
+ distance: options.minDistance ?? 120,
5587
+ enable: options.connectParticles ?? false
5588
+ },
5589
+ move: {
5590
+ enable: true,
5591
+ speed: options.speed ?? 0.5
5592
+ },
5593
+ number: {
5594
+ value: options.maxParticles ?? 100
5595
+ },
5596
+ size: {
5597
+ value: {
5598
+ min: 1,
5599
+ max: options.sizeVariations ?? 3
5600
+ }
5601
+ }
5602
+ },
5603
+ responsive: options.responsive?.map(responsive => ({
5604
+ maxWidth: responsive.breakpoint,
5605
+ options: {
5606
+ particles: {
5607
+ color: {
5608
+ value: responsive.options?.color
5609
+ },
5610
+ links: {
5611
+ distance: responsive.options?.minDistance,
5612
+ enable: responsive.options?.connectParticles
5613
+ },
5614
+ number: {
5615
+ value: options.maxParticles
5616
+ },
5617
+ move: {
5618
+ enable: true,
5619
+ speed: responsive.options?.speed
5620
+ },
5621
+ size: {
5622
+ value: responsive.options?.sizeVariations
5623
+ }
5624
+ }
5625
+ }
5626
+ }))
5627
+ }
5628
+ }).then(container => {
5629
+ particles._container = container;
5630
+ });
5631
+ return particles;
5632
+ }
5633
+ destroy() {
5634
+ const container = this._container;
5635
+ container && container.destroy();
5636
+ }
5637
+ pauseAnimation() {
5638
+ const container = this._container;
5639
+ container && container.pause();
5640
+ }
5641
+ resumeAnimation() {
5642
+ const container = this._container;
5643
+ container && container.play();
5644
+ }
5645
+ }
5646
+ ;// CONCATENATED MODULE: ../pjs/dist/browser/VincentGarreau/particles.js
5647
+
5648
+ const defaultPjsOptions = {
5649
+ particles: {
5650
+ number: {
5651
+ value: 400,
5652
+ density: {
5653
+ enable: true,
5654
+ value_area: 800
5655
+ }
5656
+ },
5657
+ color: {
5658
+ value: "#fff"
5659
+ },
5660
+ shape: {
5661
+ type: "circle",
5662
+ stroke: {
5663
+ width: 0,
5664
+ color: "#ff0000"
5665
+ },
5666
+ polygon: {
5667
+ nb_sides: 5
5668
+ },
5669
+ image: {
5670
+ src: "",
5671
+ width: 100,
5672
+ height: 100
5673
+ }
5674
+ },
5675
+ opacity: {
5676
+ value: 1,
5677
+ random: false,
5678
+ anim: {
5679
+ enable: false,
5680
+ speed: 2,
5681
+ opacity_min: 0,
5682
+ sync: false
5683
+ }
5684
+ },
5685
+ size: {
5686
+ value: 20,
5687
+ random: false,
5688
+ anim: {
5689
+ enable: false,
5690
+ speed: 20,
5691
+ size_min: 0,
5692
+ sync: false
5693
+ }
5694
+ },
5695
+ line_linked: {
5696
+ enable: true,
5697
+ distance: 100,
5698
+ color: "#fff",
5699
+ opacity: 1,
5700
+ width: 1
5701
+ },
5702
+ move: {
5703
+ enable: true,
5704
+ speed: 2,
5705
+ direction: "none",
5706
+ random: false,
5707
+ straight: false,
5708
+ out_mode: "out",
5709
+ bounce: false,
5710
+ attract: {
5711
+ enable: false,
5712
+ rotateX: 3000,
5713
+ rotateY: 3000
5714
+ }
5715
+ }
5716
+ },
5717
+ interactivity: {
5718
+ detect_on: "canvas",
5719
+ events: {
5720
+ onhover: {
5721
+ enable: true,
5722
+ mode: "grab"
5723
+ },
5724
+ onclick: {
5725
+ enable: true,
5726
+ mode: "push"
5727
+ },
5728
+ resize: true
5729
+ },
5730
+ modes: {
5731
+ grab: {
5732
+ distance: 100,
5733
+ line_linked: {
5734
+ opacity: 1
5735
+ }
5736
+ },
5737
+ bubble: {
5738
+ distance: 200,
5739
+ size: 80,
5740
+ duration: 0.4,
5741
+ opacity: 1,
5742
+ speed: 3
5743
+ },
5744
+ repulse: {
5745
+ distance: 200,
5746
+ duration: 0.4
5747
+ },
5748
+ push: {
5749
+ particles_nb: 4
5750
+ },
5751
+ remove: {
5752
+ particles_nb: 2
5753
+ }
5754
+ }
5755
+ },
5756
+ retina_detect: false
5757
+ };
5758
+ const initParticlesJS = engine => {
5759
+ const particlesJS = (tagId, options) => {
5760
+ const fixedOptions = deepExtend(defaultPjsOptions, options);
5761
+ return engine.load({
5762
+ id: tagId,
5763
+ options: {
5764
+ fullScreen: {
5765
+ enable: false
5766
+ },
5767
+ detectRetina: fixedOptions.retina_detect,
5768
+ smooth: true,
5769
+ interactivity: {
5770
+ detectsOn: fixedOptions.interactivity.detect_on,
5771
+ events: {
5772
+ onHover: {
5773
+ enable: fixedOptions.interactivity.events.onhover.enable,
5774
+ mode: fixedOptions.interactivity.events.onhover.mode
5775
+ },
5776
+ onClick: {
5777
+ enable: fixedOptions.interactivity.events.onclick.enable,
5778
+ mode: fixedOptions.interactivity.events.onclick.mode
5779
+ },
5780
+ resize: {
5781
+ enable: fixedOptions.interactivity.events.resize
5782
+ }
5783
+ },
5784
+ modes: {
5785
+ grab: {
5786
+ distance: fixedOptions.interactivity.modes.grab.distance,
5787
+ links: {
5788
+ opacity: fixedOptions.interactivity.modes.grab.line_linked.opacity
5789
+ }
5790
+ },
5791
+ bubble: {
5792
+ distance: fixedOptions.interactivity.modes.bubble.distance,
5793
+ size: fixedOptions.interactivity.modes.bubble.size,
5794
+ duration: fixedOptions.interactivity.modes.bubble.duration,
5795
+ opacity: fixedOptions.interactivity.modes.bubble.opacity,
5796
+ speed: fixedOptions.interactivity.modes.bubble.speed
5797
+ },
5798
+ repulse: {
5799
+ distance: fixedOptions.interactivity.modes.repulse.distance,
5800
+ duration: fixedOptions.interactivity.modes.repulse.duration
5801
+ },
5802
+ push: {
5803
+ quantity: fixedOptions.interactivity.modes.push.particles_nb
5804
+ },
5805
+ remove: {
5806
+ quantity: fixedOptions.interactivity.modes.remove.particles_nb
5807
+ }
5808
+ }
5809
+ },
5810
+ particles: {
5811
+ collisions: {
5812
+ enable: fixedOptions.particles.move.bounce
5813
+ },
5814
+ number: {
5815
+ value: fixedOptions.particles.number.value,
5816
+ density: {
5817
+ enable: fixedOptions.particles.number.density.enable,
5818
+ width: fixedOptions.particles.number.density.value_area
5819
+ }
5820
+ },
5821
+ color: {
5822
+ value: fixedOptions.particles.color.value
5823
+ },
5824
+ stroke: {
5825
+ width: fixedOptions.particles.shape.stroke.width,
5826
+ color: {
5827
+ value: fixedOptions.particles.shape.stroke.color
5828
+ }
5829
+ },
5830
+ shape: {
5831
+ type: fixedOptions.particles.shape.type,
5832
+ options: {
5833
+ polygon: {
5834
+ sides: fixedOptions.particles.shape.polygon.nb_sides
5835
+ },
5836
+ image: {
5837
+ src: fixedOptions.particles.shape.image.src,
5838
+ width: fixedOptions.particles.shape.image.width,
5839
+ height: fixedOptions.particles.shape.image.height
5840
+ }
5841
+ }
5842
+ },
5843
+ opacity: {
5844
+ value: fixedOptions.particles.opacity.random ? {
5845
+ min: fixedOptions.particles.opacity.anim.enable ? fixedOptions.particles.opacity.anim.opacity_min : 0,
5846
+ max: fixedOptions.particles.opacity.value
5847
+ } : fixedOptions.particles.opacity.value,
5848
+ animation: {
5849
+ enable: fixedOptions.particles.opacity.anim.enable,
5850
+ speed: fixedOptions.particles.opacity.anim.speed,
5851
+ sync: fixedOptions.particles.opacity.anim.sync
5852
+ }
5853
+ },
5854
+ size: {
5855
+ value: fixedOptions.particles.size.random ? {
5856
+ min: fixedOptions.particles.size.anim.enable ? fixedOptions.particles.size.anim.size_min : 0,
5857
+ max: fixedOptions.particles.size.value
5858
+ } : fixedOptions.particles.size.value,
5859
+ animation: {
5860
+ enable: fixedOptions.particles.size.anim.enable,
5861
+ speed: fixedOptions.particles.size.anim.speed,
5862
+ sync: fixedOptions.particles.size.anim.sync
5863
+ }
5864
+ },
5865
+ links: {
5866
+ enable: fixedOptions.particles.line_linked.enable,
5867
+ distance: fixedOptions.particles.line_linked.distance,
5868
+ color: fixedOptions.particles.line_linked.color,
5869
+ opacity: fixedOptions.particles.line_linked.opacity,
5870
+ width: fixedOptions.particles.line_linked.width
5871
+ },
5872
+ move: {
5873
+ enable: fixedOptions.particles.move.enable,
5874
+ speed: fixedOptions.particles.move.speed / 3,
5875
+ direction: fixedOptions.particles.move.direction,
5876
+ random: fixedOptions.particles.move.random,
5877
+ straight: fixedOptions.particles.move.straight,
5878
+ outModes: fixedOptions.particles.move.out_mode,
5879
+ attract: {
5880
+ enable: fixedOptions.particles.move.attract.enable,
5881
+ rotate: {
5882
+ x: fixedOptions.particles.move.attract.rotateX,
5883
+ y: fixedOptions.particles.move.attract.rotateY
5884
+ }
5885
+ }
5886
+ }
5887
+ }
5888
+ }
5889
+ });
5890
+ };
5891
+ particlesJS.load = (tagId, pathConfigJson, callback) => {
5892
+ engine.load({
5893
+ id: tagId,
5894
+ url: pathConfigJson
5895
+ }).then(container => {
5896
+ if (container) {
5897
+ callback(container);
5898
+ }
5899
+ }).catch(() => {
5900
+ callback(undefined);
5901
+ });
5902
+ };
5903
+ particlesJS.setOnClickHandler = callback => {
5904
+ engine.setOnClickHandler(callback);
5905
+ };
5906
+ const pJSDom = engine.dom();
5907
+ return {
5908
+ particlesJS,
5909
+ pJSDom
5910
+ };
5911
+ };
5912
+
5913
+ ;// CONCATENATED MODULE: ../pjs/dist/browser/index.js
5914
+
5915
+
5916
+ const initPjs = engine => {
5917
+ const {
5918
+ particlesJS,
5919
+ pJSDom
5920
+ } = initParticlesJS(engine);
5921
+ window.particlesJS = particlesJS;
5922
+ window.pJSDom = pJSDom;
5923
+ window.Particles = Particles_Particles;
5924
+ return {
5925
+ particlesJS,
5926
+ pJSDom,
5927
+ Particles: Particles_Particles
5928
+ };
5929
+ };
5930
+
5539
5931
  ;// CONCATENATED MODULE: ../../shapes/arrow/dist/browser/ArrowDrawer.js
5540
5932
 
5541
5933
  class ArrowDrawer {
@@ -9454,164 +9846,30 @@ class RollUpdater {
9454
9846
  init(particle) {
9455
9847
  initParticle(particle);
9456
9848
  }
9457
- isEnabled(particle) {
9458
- const roll = particle.options.roll;
9459
- return !particle.destroyed && !particle.spawning && !!roll?.enable;
9460
- }
9461
- loadOptions(options, ...sources) {
9462
- if (!options.roll) {
9463
- options.roll = new Roll();
9464
- }
9465
- for (const source of sources) {
9466
- options.roll.load(source?.roll);
9467
- }
9468
- }
9469
- update(particle, delta) {
9470
- if (!this.isEnabled(particle)) {
9471
- return;
9472
- }
9473
- updateRoll(particle, delta);
9474
- }
9475
- }
9476
- ;// CONCATENATED MODULE: ../../updaters/roll/dist/browser/index.js
9477
-
9478
- async function loadRollUpdater(engine, refresh = true) {
9479
- await engine.addParticleUpdater("roll", () => new RollUpdater(), refresh);
9480
- }
9481
- ;// CONCATENATED MODULE: ../pjs/dist/browser/marcbruederlin/Particles.js
9482
-
9483
- class Particles_Particles {
9484
- static init(options) {
9485
- const particles = new Particles_Particles(),
9486
- selector = options.selector;
9487
- if (!selector) {
9488
- throw new Error("No selector provided");
9489
- }
9490
- const el = document.querySelector(selector);
9491
- if (!el) {
9492
- throw new Error("No element found for selector");
9493
- }
9494
- tsParticles.load({
9495
- id: selector.replace(".", "").replace("!", ""),
9496
- element: el,
9497
- options: {
9498
- fullScreen: {
9499
- enable: false
9500
- },
9501
- particles: {
9502
- color: {
9503
- value: options.color ?? "!000000"
9504
- },
9505
- links: {
9506
- color: "random",
9507
- distance: options.minDistance ?? 120,
9508
- enable: options.connectParticles ?? false
9509
- },
9510
- move: {
9511
- enable: true,
9512
- speed: options.speed ?? 0.5
9513
- },
9514
- number: {
9515
- value: options.maxParticles ?? 100
9516
- },
9517
- size: {
9518
- value: {
9519
- min: 1,
9520
- max: options.sizeVariations ?? 3
9521
- }
9522
- }
9523
- },
9524
- responsive: options.responsive?.map(responsive => ({
9525
- maxWidth: responsive.breakpoint,
9526
- options: {
9527
- particles: {
9528
- color: {
9529
- value: responsive.options?.color
9530
- },
9531
- links: {
9532
- distance: responsive.options?.minDistance,
9533
- enable: responsive.options?.connectParticles
9534
- },
9535
- number: {
9536
- value: options.maxParticles
9537
- },
9538
- move: {
9539
- enable: true,
9540
- speed: responsive.options?.speed
9541
- },
9542
- size: {
9543
- value: responsive.options?.sizeVariations
9544
- }
9545
- }
9546
- }
9547
- }))
9548
- }
9549
- }).then(container => {
9550
- particles._container = container;
9551
- });
9552
- return particles;
9553
- }
9554
- destroy() {
9555
- const container = this._container;
9556
- container && container.destroy();
9849
+ isEnabled(particle) {
9850
+ const roll = particle.options.roll;
9851
+ return !particle.destroyed && !particle.spawning && !!roll?.enable;
9557
9852
  }
9558
- pauseAnimation() {
9559
- const container = this._container;
9560
- container && container.pause();
9853
+ loadOptions(options, ...sources) {
9854
+ if (!options.roll) {
9855
+ options.roll = new Roll();
9856
+ }
9857
+ for (const source of sources) {
9858
+ options.roll.load(source?.roll);
9859
+ }
9561
9860
  }
9562
- resumeAnimation() {
9563
- const container = this._container;
9564
- container && container.play();
9861
+ update(particle, delta) {
9862
+ if (!this.isEnabled(particle)) {
9863
+ return;
9864
+ }
9865
+ updateRoll(particle, delta);
9565
9866
  }
9566
9867
  }
9567
- ;// CONCATENATED MODULE: ../pjs/dist/browser/VincentGarreau/particles.js
9568
- const initParticlesJS = engine => {
9569
- const particlesJS = (tagId, options) => {
9570
- return engine.load({
9571
- id: tagId,
9572
- options
9573
- });
9574
- };
9575
- particlesJS.load = (tagId, pathConfigJson, callback) => {
9576
- engine.load({
9577
- id: tagId,
9578
- url: pathConfigJson
9579
- }).then(container => {
9580
- if (container) {
9581
- callback(container);
9582
- }
9583
- }).catch(() => {
9584
- callback(undefined);
9585
- });
9586
- };
9587
- particlesJS.setOnClickHandler = callback => {
9588
- engine.setOnClickHandler(callback);
9589
- };
9590
- const pJSDom = engine.dom();
9591
- return {
9592
- particlesJS,
9593
- pJSDom
9594
- };
9595
- };
9596
-
9597
- ;// CONCATENATED MODULE: ../pjs/dist/browser/index.js
9598
-
9599
-
9600
- const initPjs = engine => {
9601
- const {
9602
- particlesJS,
9603
- pJSDom
9604
- } = initParticlesJS(engine);
9605
- window.particlesJS = particlesJS;
9606
- window.pJSDom = pJSDom;
9607
- window.Particles = Particles_Particles;
9608
- return {
9609
- particlesJS,
9610
- pJSDom,
9611
- Particles: Particles_Particles
9612
- };
9613
- };
9868
+ ;// CONCATENATED MODULE: ../../updaters/roll/dist/browser/index.js
9614
9869
 
9870
+ async function loadRollUpdater(engine, refresh = true) {
9871
+ await engine.addParticleUpdater("roll", () => new RollUpdater(), refresh);
9872
+ }
9615
9873
  ;// CONCATENATED MODULE: ../../move/base/dist/browser/Utils.js
9616
9874
 
9617
9875
  function applyDistance(particle) {
@@ -10312,7 +10570,7 @@ class OutOutMode {
10312
10570
  }
10313
10571
  case "normal":
10314
10572
  {
10315
- const wrap = particle.options.move.warp,
10573
+ const warp = particle.options.move.warp,
10316
10574
  canvasSize = container.canvas.size,
10317
10575
  newPos = {
10318
10576
  bottom: canvasSize.height + particle.getRadius() + particle.offset.y,
@@ -10325,27 +10583,27 @@ class OutOutMode {
10325
10583
  if (direction === "right" && nextBounds.left > canvasSize.width + particle.offset.x) {
10326
10584
  particle.position.x = newPos.left;
10327
10585
  particle.initialPosition.x = particle.position.x;
10328
- if (!wrap) {
10586
+ if (!warp) {
10329
10587
  particle.position.y = getRandom() * canvasSize.height;
10330
10588
  particle.initialPosition.y = particle.position.y;
10331
10589
  }
10332
10590
  } else if (direction === "left" && nextBounds.right < -particle.offset.x) {
10333
10591
  particle.position.x = newPos.right;
10334
10592
  particle.initialPosition.x = particle.position.x;
10335
- if (!wrap) {
10593
+ if (!warp) {
10336
10594
  particle.position.y = getRandom() * canvasSize.height;
10337
10595
  particle.initialPosition.y = particle.position.y;
10338
10596
  }
10339
10597
  }
10340
10598
  if (direction === "bottom" && nextBounds.top > canvasSize.height + particle.offset.y) {
10341
- if (!wrap) {
10599
+ if (!warp) {
10342
10600
  particle.position.x = getRandom() * canvasSize.width;
10343
10601
  particle.initialPosition.x = particle.position.x;
10344
10602
  }
10345
10603
  particle.position.y = newPos.top;
10346
10604
  particle.initialPosition.y = particle.position.y;
10347
10605
  } else if (direction === "top" && nextBounds.bottom < -particle.offset.y) {
10348
- if (!wrap) {
10606
+ if (!warp) {
10349
10607
  particle.position.x = getRandom() * canvasSize.width;
10350
10608
  particle.initialPosition.x = particle.position.x;
10351
10609
  }
@@ -10513,6 +10771,104 @@ async function loadEasingQuadPlugin() {
10513
10771
  addEasing("ease-out-quad", value => 1 - (1 - value) ** 2);
10514
10772
  addEasing("ease-in-out-quad", value => value < 0.5 ? 2 * value ** 2 : 1 - (-2 * value + 2) ** 2 / 2);
10515
10773
  }
10774
+ ;// CONCATENATED MODULE: ../../shapes/emoji/dist/browser/EmojiDrawer.js
10775
+
10776
+ const validTypes = ["emoji"];
10777
+ const defaultFont = '"Twemoji Mozilla", Apple Color Emoji, "Segoe UI Emoji", "Noto Color Emoji", "EmojiOne Color"';
10778
+ class EmojiDrawer {
10779
+ constructor() {
10780
+ this._emojiShapeDict = new Map();
10781
+ }
10782
+ destroy() {
10783
+ for (const [, emojiData] of this._emojiShapeDict) {
10784
+ emojiData instanceof ImageBitmap && emojiData?.close();
10785
+ }
10786
+ }
10787
+ draw(data) {
10788
+ const {
10789
+ context,
10790
+ particle,
10791
+ radius,
10792
+ opacity
10793
+ } = data,
10794
+ emojiData = particle.emojiData;
10795
+ if (!emojiData) {
10796
+ return;
10797
+ }
10798
+ context.globalAlpha = opacity;
10799
+ context.drawImage(emojiData, -radius, -radius, radius * 2, radius * 2);
10800
+ context.globalAlpha = 1;
10801
+ }
10802
+ async init(container) {
10803
+ const options = container.actualOptions;
10804
+ if (validTypes.find(t => isInArray(t, options.particles.shape.type))) {
10805
+ const promises = [loadFont(defaultFont)],
10806
+ shapeOptions = validTypes.map(t => options.particles.shape.options[t]).find(t => !!t);
10807
+ if (shapeOptions) {
10808
+ executeOnSingleOrMultiple(shapeOptions, shape => {
10809
+ shape.font && promises.push(loadFont(shape.font));
10810
+ });
10811
+ }
10812
+ await Promise.all(promises);
10813
+ }
10814
+ }
10815
+ particleDestroy(particle) {
10816
+ delete particle.emojiData;
10817
+ }
10818
+ particleInit(container, particle) {
10819
+ if (!particle.emojiData) {
10820
+ const shapeData = particle.shapeData;
10821
+ if (!shapeData?.value) {
10822
+ return;
10823
+ }
10824
+ const emoji = itemFromSingleOrMultiple(shapeData.value, particle.randomIndexData),
10825
+ font = shapeData.font ?? defaultFont;
10826
+ if (!emoji) {
10827
+ return;
10828
+ }
10829
+ const key = `${emoji}_${font}`,
10830
+ existingData = this._emojiShapeDict.get(key);
10831
+ if (existingData) {
10832
+ particle.emojiData = existingData;
10833
+ return;
10834
+ }
10835
+ const canvasSize = getRangeMax(particle.size.value) * 2;
10836
+ let emojiData;
10837
+ if (typeof OffscreenCanvas !== "undefined") {
10838
+ const canvas = new OffscreenCanvas(canvasSize, canvasSize),
10839
+ context = canvas.getContext("2d");
10840
+ if (!context) {
10841
+ return;
10842
+ }
10843
+ context.font = `400 ${getRangeMax(particle.size.value) * 2}px ${font}`;
10844
+ context.textBaseline = "middle";
10845
+ context.textAlign = "center";
10846
+ context.fillText(emoji, getRangeMax(particle.size.value), getRangeMax(particle.size.value));
10847
+ emojiData = canvas.transferToImageBitmap();
10848
+ } else {
10849
+ const canvas = document.createElement("canvas");
10850
+ canvas.width = canvasSize;
10851
+ canvas.height = canvasSize;
10852
+ const context = canvas.getContext("2d");
10853
+ if (!context) {
10854
+ return;
10855
+ }
10856
+ context.font = `400 ${getRangeMax(particle.size.value) * 2}px ${font}`;
10857
+ context.textBaseline = "middle";
10858
+ context.textAlign = "center";
10859
+ context.fillText(emoji, getRangeMax(particle.size.value), getRangeMax(particle.size.value));
10860
+ emojiData = canvas;
10861
+ }
10862
+ this._emojiShapeDict.set(key, emojiData);
10863
+ particle.emojiData = emojiData;
10864
+ }
10865
+ }
10866
+ }
10867
+ ;// CONCATENATED MODULE: ../../shapes/emoji/dist/browser/index.js
10868
+
10869
+ async function loadEmojiShape(engine, refresh = true) {
10870
+ await engine.addShape(validTypes, new EmojiDrawer(), refresh);
10871
+ }
10516
10872
  ;// CONCATENATED MODULE: ../../interactions/external/attract/dist/browser/Options/Classes/Attract.js
10517
10873
  class Attract {
10518
10874
  constructor() {
@@ -11413,18 +11769,6 @@ class Grab {
11413
11769
  this.distance = 100;
11414
11770
  this.links = new GrabLinks();
11415
11771
  }
11416
- get lineLinked() {
11417
- return this.links;
11418
- }
11419
- set lineLinked(value) {
11420
- this.links = value;
11421
- }
11422
- get line_linked() {
11423
- return this.links;
11424
- }
11425
- set line_linked(value) {
11426
- this.links = value;
11427
- }
11428
11772
  load(data) {
11429
11773
  if (!data) {
11430
11774
  return;
@@ -11432,7 +11776,7 @@ class Grab {
11432
11776
  if (data.distance !== undefined) {
11433
11777
  this.distance = data.distance;
11434
11778
  }
11435
- this.links.load(data.links ?? data.lineLinked ?? data.line_linked);
11779
+ this.links.load(data.links);
11436
11780
  }
11437
11781
  }
11438
11782
  ;// CONCATENATED MODULE: ../../interactions/external/grab/dist/browser/Utils.js
@@ -11571,12 +11915,6 @@ class Push {
11571
11915
  this.groups = [];
11572
11916
  this.quantity = 4;
11573
11917
  }
11574
- get particles_nb() {
11575
- return this.quantity;
11576
- }
11577
- set particles_nb(value) {
11578
- this.quantity = setRangeValue(value);
11579
- }
11580
11918
  load(data) {
11581
11919
  if (!data) {
11582
11920
  return;
@@ -11590,7 +11928,7 @@ class Push {
11590
11928
  if (!this.groups.length) {
11591
11929
  this.default = true;
11592
11930
  }
11593
- const quantity = data.quantity ?? data.particles_nb;
11931
+ const quantity = data.quantity;
11594
11932
  if (quantity !== undefined) {
11595
11933
  this.quantity = setRangeValue(quantity);
11596
11934
  }
@@ -11651,17 +11989,11 @@ class Remove {
11651
11989
  constructor() {
11652
11990
  this.quantity = 2;
11653
11991
  }
11654
- get particles_nb() {
11655
- return this.quantity;
11656
- }
11657
- set particles_nb(value) {
11658
- this.quantity = setRangeValue(value);
11659
- }
11660
11992
  load(data) {
11661
11993
  if (!data) {
11662
11994
  return;
11663
11995
  }
11664
- const quantity = data.quantity ?? data.particles_nb;
11996
+ const quantity = data.quantity;
11665
11997
  if (quantity !== undefined) {
11666
11998
  this.quantity = setRangeValue(quantity);
11667
11999
  }
@@ -12724,8 +13056,9 @@ class ImageDrawer {
12724
13056
  pos = {
12725
13057
  x: -radius,
12726
13058
  y: -radius
12727
- };
12728
- context.drawImage(element, pos.x, pos.y, radius * 2, radius * 2 / ratio);
13059
+ },
13060
+ diameter = radius * 2;
13061
+ context.drawImage(element, pos.x, pos.y, diameter, diameter / ratio);
12729
13062
  }
12730
13063
  context.globalAlpha = 1;
12731
13064
  }
@@ -13562,7 +13895,7 @@ class Linker extends ParticlesInteractorBase {
13562
13895
  options.links = new Links();
13563
13896
  }
13564
13897
  for (const source of sources) {
13565
- options.links.load(source?.links ?? source?.lineLinked ?? source?.line_linked);
13898
+ options.links.load(source?.links);
13566
13899
  }
13567
13900
  }
13568
13901
  reset() {}
@@ -14315,9 +14648,62 @@ class StrokeColorUpdater {
14315
14648
  async function loadStrokeColorUpdater(engine, refresh = true) {
14316
14649
  await engine.addParticleUpdater("strokeColor", container => new StrokeColorUpdater(container), refresh);
14317
14650
  }
14651
+ ;// CONCATENATED MODULE: ../slim/dist/browser/index.js
14652
+
14653
+
14654
+
14655
+
14656
+
14657
+
14658
+
14659
+
14660
+
14661
+
14662
+
14663
+
14664
+
14665
+
14666
+
14667
+
14668
+
14669
+
14670
+
14671
+
14672
+
14673
+
14674
+
14675
+
14676
+
14677
+ async function loadSlim(engine, refresh = true) {
14678
+ await loadParallaxMover(engine, false);
14679
+ await loadExternalAttractInteraction(engine, false);
14680
+ await loadExternalBounceInteraction(engine, false);
14681
+ await loadExternalBubbleInteraction(engine, false);
14682
+ await loadExternalConnectInteraction(engine, false);
14683
+ await loadExternalGrabInteraction(engine, false);
14684
+ await loadExternalPauseInteraction(engine, false);
14685
+ await loadExternalPushInteraction(engine, false);
14686
+ await loadExternalRemoveInteraction(engine, false);
14687
+ await loadExternalRepulseInteraction(engine, false);
14688
+ await loadExternalSlowInteraction(engine, false);
14689
+ await loadParticlesAttractInteraction(engine, false);
14690
+ await loadParticlesCollisionsInteraction(engine, false);
14691
+ await loadParticlesLinksInteraction(engine, false);
14692
+ await loadEasingQuadPlugin();
14693
+ await loadEmojiShape(engine, false);
14694
+ await loadImageShape(engine, false);
14695
+ await loadLineShape(engine, false);
14696
+ await loadPolygonShape(engine, false);
14697
+ await loadSquareShape(engine, false);
14698
+ await loadStarShape(engine, false);
14699
+ await loadLifeUpdater(engine, false);
14700
+ await loadRotateUpdater(engine, false);
14701
+ await loadStrokeColorUpdater(engine, false);
14702
+ await loadBasic(engine, refresh);
14703
+ }
14318
14704
  ;// CONCATENATED MODULE: ../../shapes/text/dist/browser/TextDrawer.js
14319
14705
 
14320
- const validTypes = ["text", "character", "char", "multiline-text"];
14706
+ const TextDrawer_validTypes = ["text", "character", "char", "multiline-text"];
14321
14707
  class TextDrawer {
14322
14708
  constructor() {
14323
14709
  this._drawLine = (context, line, radius, opacity, index, fill) => {
@@ -14325,11 +14711,12 @@ class TextDrawer {
14325
14711
  pos = {
14326
14712
  x: -offsetX,
14327
14713
  y: radius / 2
14328
- };
14714
+ },
14715
+ diameter = radius * 2;
14329
14716
  if (fill) {
14330
- context.fillText(line, pos.x, pos.y + radius * 2 * index);
14717
+ context.fillText(line, pos.x, pos.y + diameter * index);
14331
14718
  } else {
14332
- context.strokeText(line, pos.x, pos.y + radius * 2 * index);
14719
+ context.strokeText(line, pos.x, pos.y + diameter * index);
14333
14720
  }
14334
14721
  };
14335
14722
  }
@@ -14370,8 +14757,8 @@ class TextDrawer {
14370
14757
  }
14371
14758
  async init(container) {
14372
14759
  const options = container.actualOptions;
14373
- if (validTypes.find(t => isInArray(t, options.particles.shape.type))) {
14374
- const shapeOptions = validTypes.map(t => options.particles.shape.options[t]).find(t => !!t),
14760
+ if (TextDrawer_validTypes.find(t => isInArray(t, options.particles.shape.type))) {
14761
+ const shapeOptions = TextDrawer_validTypes.map(t => options.particles.shape.options[t]).find(t => !!t),
14375
14762
  promises = [];
14376
14763
  executeOnSingleOrMultiple(shapeOptions, shape => {
14377
14764
  promises.push(loadFont(shape.font, shape.weight));
@@ -14380,7 +14767,7 @@ class TextDrawer {
14380
14767
  }
14381
14768
  }
14382
14769
  particleInit(container, particle) {
14383
- if (!particle.shape || !validTypes.includes(particle.shape)) {
14770
+ if (!particle.shape || !TextDrawer_validTypes.includes(particle.shape)) {
14384
14771
  return;
14385
14772
  }
14386
14773
  const character = particle.shapeData;
@@ -14397,62 +14784,7 @@ class TextDrawer {
14397
14784
  ;// CONCATENATED MODULE: ../../shapes/text/dist/browser/index.js
14398
14785
 
14399
14786
  async function loadTextShape(engine, refresh = true) {
14400
- await engine.addShape(validTypes, new TextDrawer(), refresh);
14401
- }
14402
- ;// CONCATENATED MODULE: ../slim/dist/browser/index.js
14403
-
14404
-
14405
-
14406
-
14407
-
14408
-
14409
-
14410
-
14411
-
14412
-
14413
-
14414
-
14415
-
14416
-
14417
-
14418
-
14419
-
14420
-
14421
-
14422
-
14423
-
14424
-
14425
-
14426
-
14427
-
14428
-
14429
- async function loadSlim(engine, refresh = true) {
14430
- initPjs(engine);
14431
- await loadParallaxMover(engine, false);
14432
- await loadExternalAttractInteraction(engine, false);
14433
- await loadExternalBounceInteraction(engine, false);
14434
- await loadExternalBubbleInteraction(engine, false);
14435
- await loadExternalConnectInteraction(engine, false);
14436
- await loadExternalGrabInteraction(engine, false);
14437
- await loadExternalPauseInteraction(engine, false);
14438
- await loadExternalPushInteraction(engine, false);
14439
- await loadExternalRemoveInteraction(engine, false);
14440
- await loadExternalRepulseInteraction(engine, false);
14441
- await loadExternalSlowInteraction(engine, false);
14442
- await loadParticlesAttractInteraction(engine, false);
14443
- await loadParticlesCollisionsInteraction(engine, false);
14444
- await loadParticlesLinksInteraction(engine, false);
14445
- await loadEasingQuadPlugin();
14446
- await loadImageShape(engine, false);
14447
- await loadLineShape(engine, false);
14448
- await loadPolygonShape(engine, false);
14449
- await loadSquareShape(engine, false);
14450
- await loadStarShape(engine, false);
14451
- await loadTextShape(engine, false);
14452
- await loadLifeUpdater(engine, false);
14453
- await loadRotateUpdater(engine, false);
14454
- await loadStrokeColorUpdater(engine, false);
14455
- await loadBasic(engine, refresh);
14787
+ await engine.addShape(TextDrawer_validTypes, new TextDrawer(), refresh);
14456
14788
  }
14457
14789
  ;// CONCATENATED MODULE: ../../updaters/tilt/dist/browser/Options/Classes/TiltAnimation.js
14458
14790
 
@@ -14840,12 +15172,14 @@ async function loadWobbleUpdater(engine, refresh = true) {
14840
15172
 
14841
15173
 
14842
15174
 
15175
+
14843
15176
  async function loadFull(engine, refresh = true) {
14844
15177
  await loadDestroyUpdater(engine, false);
14845
15178
  await loadRollUpdater(engine, false);
14846
15179
  await loadTiltUpdater(engine, false);
14847
15180
  await loadTwinkleUpdater(engine, false);
14848
15181
  await loadWobbleUpdater(engine, false);
15182
+ await loadTextShape(engine, false);
14849
15183
  await loadExternalTrailInteraction(engine, false);
14850
15184
  await loadAbsorbersPlugin(engine, false);
14851
15185
  await loadEmittersPlugin(engine, false);
@@ -15270,20 +15604,23 @@ async function loadGradientUpdater(engine, refresh = true) {
15270
15604
  class HeartDrawer_HeartDrawer {
15271
15605
  draw(data) {
15272
15606
  const {
15273
- context,
15274
- radius
15275
- } = data;
15276
- const x = -radius,
15607
+ context,
15608
+ radius
15609
+ } = data,
15610
+ diameter = radius * 2,
15611
+ halfRadius = radius * 0.5,
15612
+ radiusAndHalf = radius + halfRadius,
15613
+ x = -radius,
15277
15614
  y = -radius;
15278
15615
  context.moveTo(x, y + radius / 2);
15279
- context.quadraticCurveTo(x, y, x + radius / 2, y);
15280
- context.quadraticCurveTo(x + radius, y, x + radius, y + radius / 2);
15281
- context.quadraticCurveTo(x + radius, y, x + radius * 3 / 2, y);
15282
- context.quadraticCurveTo(x + radius * 2, y, x + radius * 2, y + radius / 2);
15283
- context.quadraticCurveTo(x + radius * 2, y + radius, x + radius * 3 / 2, y + radius * 3 / 2);
15284
- context.lineTo(x + radius, y + radius * 2);
15285
- context.lineTo(x + radius / 2, y + radius * 3 / 2);
15286
- context.quadraticCurveTo(x, y + radius, x, y + radius / 2);
15616
+ context.quadraticCurveTo(x, y, x + halfRadius, y);
15617
+ context.quadraticCurveTo(x + radius, y, x + radius, y + halfRadius);
15618
+ context.quadraticCurveTo(x + radius, y, x + radiusAndHalf, y);
15619
+ context.quadraticCurveTo(x + diameter, y, x + diameter, y + halfRadius);
15620
+ context.quadraticCurveTo(x + diameter, y + radius, x + radiusAndHalf, y + radiusAndHalf);
15621
+ context.lineTo(x + radius, y + diameter);
15622
+ context.lineTo(x + halfRadius, y + radiusAndHalf);
15623
+ context.quadraticCurveTo(x, y + radius, x, y + halfRadius);
15287
15624
  }
15288
15625
  }
15289
15626
  ;// CONCATENATED MODULE: ../../shapes/heart/dist/browser/index.js
@@ -19996,6 +20333,7 @@ class TrailDrawer {
19996
20333
  radius,
19997
20334
  particle
19998
20335
  } = data,
20336
+ diameter = radius * 2,
19999
20337
  pxRatio = particle.container.retina.pixelRatio,
20000
20338
  currentPos = particle.getPosition();
20001
20339
  if (!particle.trail || !particle.trailLength) {
@@ -20012,34 +20350,52 @@ class TrailDrawer {
20012
20350
  if (particle.trail.length < 2) {
20013
20351
  return;
20014
20352
  }
20015
- if (particle.trail.length > pathLength) {
20353
+ while (particle.trail.length > pathLength) {
20016
20354
  particle.trail.shift();
20017
20355
  }
20018
20356
  const trailLength = Math.min(particle.trail.length, pathLength),
20019
20357
  offsetPos = {
20020
20358
  x: currentPos.x,
20021
20359
  y: currentPos.y
20360
+ },
20361
+ canvasSize = {
20362
+ width: particle.container.canvas.size.width + diameter,
20363
+ height: particle.container.canvas.size.height + diameter
20022
20364
  };
20023
20365
  let lastPos = particle.trail[trailLength - 1].position;
20366
+ context.setTransform(1, 0, 0, 1, currentPos.x, currentPos.y);
20024
20367
  for (let i = trailLength; i > 0; i--) {
20025
20368
  const step = particle.trail[i - 1],
20026
20369
  position = step.position;
20027
- if (getDistance(lastPos, position) > radius * 2) {
20028
- continue;
20029
- }
20030
20370
  context.beginPath();
20031
20371
  context.moveTo(lastPos.x - offsetPos.x, lastPos.y - offsetPos.y);
20032
- context.lineTo(position.x - offsetPos.x, position.y - offsetPos.y);
20033
- const width = Math.max(i / trailLength * radius * 2, pxRatio, particle.trailMinWidth ?? -1);
20372
+ const warp = {
20373
+ x: (lastPos.x + canvasSize.width) % canvasSize.width,
20374
+ y: (lastPos.y + canvasSize.height) % canvasSize.height
20375
+ };
20376
+ if (Math.abs(lastPos.x - position.x) > canvasSize.width / 2 || Math.abs(lastPos.y - position.y) > canvasSize.height / 2) {
20377
+ lastPos = position;
20378
+ continue;
20379
+ }
20380
+ context.lineTo((Math.abs(lastPos.x - position.x) > canvasSize.width / 2 ? warp.x : position.x) - offsetPos.x, (Math.abs(lastPos.y - position.y) > canvasSize.height / 2 ? warp.y : position.y) - offsetPos.y);
20381
+ const width = Math.max(i / trailLength * diameter, pxRatio, particle.trailMinWidth ?? -1);
20382
+ const oldAlpha = context.globalAlpha;
20383
+ context.globalAlpha = particle.trailFade ? i / trailLength : 1;
20034
20384
  context.lineWidth = particle.trailMaxWidth ? Math.min(width, particle.trailMaxWidth) : width;
20035
20385
  context.strokeStyle = step.color;
20036
20386
  context.stroke();
20387
+ context.globalAlpha = oldAlpha;
20037
20388
  lastPos = position;
20038
20389
  }
20390
+ const {
20391
+ transformData
20392
+ } = data;
20393
+ context.setTransform(transformData.a, transformData.b, transformData.c, transformData.d, currentPos.x, currentPos.y);
20039
20394
  }
20040
20395
  particleInit(container, particle) {
20041
20396
  particle.trail = [];
20042
20397
  const effectData = particle.effectData;
20398
+ particle.trailFade = effectData?.fade ?? true;
20043
20399
  particle.trailLength = getRangeValue(effectData?.length ?? 10) * container.retina.pixelRatio;
20044
20400
  particle.trailMaxWidth = effectData?.maxWidth ? getRangeValue(effectData.maxWidth) * container.retina.pixelRatio : undefined;
20045
20401
  particle.trailMinWidth = effectData?.minWidth ? getRangeValue(effectData.minWidth) * container.retina.pixelRatio : undefined;
@@ -20091,9 +20447,11 @@ async function loadTrailEffect(engine, refresh = true) {
20091
20447
 
20092
20448
 
20093
20449
 
20450
+
20094
20451
 
20095
20452
 
20096
20453
  async function loadAll(engine, refresh = true) {
20454
+ initPjs(engine);
20097
20455
  await loadFull(engine, false);
20098
20456
  await loadHsvColorPlugin();
20099
20457
  await loadEasingBackPlugin();