tsparticles 1.41.3 → 1.41.6
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/Core/Canvas.js +1 -4
- package/Core/Particle.d.ts +1 -0
- package/Core/Particle.js +1 -0
- package/Core/Particles.js +2 -1
- package/Plugins/Emitters/EmitterInstance.js +8 -7
- package/Updaters/Size/SizeUpdater.js +0 -1
- package/browser/Core/Canvas.js +1 -4
- package/browser/Core/Particle.d.ts +1 -0
- package/browser/Core/Particle.js +1 -0
- package/browser/Core/Particles.js +2 -1
- package/browser/Plugins/Emitters/EmitterInstance.js +8 -7
- package/browser/Updaters/Size/SizeUpdater.js +0 -1
- package/esm/Core/Canvas.js +1 -4
- package/esm/Core/Particle.d.ts +1 -0
- package/esm/Core/Particle.js +1 -0
- package/esm/Core/Particles.js +2 -1
- package/esm/Plugins/Emitters/EmitterInstance.js +8 -7
- package/esm/Updaters/Size/SizeUpdater.js +0 -1
- package/package.json +1 -1
- package/report.html +2 -2
- package/report.slim.html +2 -2
- package/tsparticles.engine.js +4 -5
- package/tsparticles.engine.min.js +2 -2
- package/tsparticles.interaction.external.attract.js +4 -5
- package/tsparticles.interaction.external.attract.min.js +1 -1
- package/tsparticles.interaction.external.bounce.js +4 -5
- package/tsparticles.interaction.external.bounce.min.js +1 -1
- package/tsparticles.interaction.external.bubble.js +4 -5
- package/tsparticles.interaction.external.bubble.min.js +1 -1
- package/tsparticles.interaction.external.connect.js +4 -5
- package/tsparticles.interaction.external.connect.min.js +1 -1
- package/tsparticles.interaction.external.grab.js +4 -5
- package/tsparticles.interaction.external.grab.min.js +1 -1
- package/tsparticles.interaction.external.repulse.js +4 -5
- package/tsparticles.interaction.external.repulse.min.js +1 -1
- package/tsparticles.interaction.external.trail.js +4 -5
- package/tsparticles.interaction.external.trail.min.js +1 -1
- package/tsparticles.interaction.particles.attract.js +4 -5
- package/tsparticles.interaction.particles.attract.min.js +1 -1
- package/tsparticles.interaction.particles.collisions.js +4 -5
- package/tsparticles.interaction.particles.collisions.min.js +1 -1
- package/tsparticles.interaction.particles.links.js +4 -5
- package/tsparticles.interaction.particles.links.min.js +1 -1
- package/tsparticles.js +12 -13
- package/tsparticles.min.js +2 -2
- package/tsparticles.pathseg.min.js +1 -1
- package/tsparticles.plugins.absorbers.js +4 -5
- package/tsparticles.plugins.absorbers.min.js +1 -1
- package/tsparticles.plugins.emitters.js +12 -12
- package/tsparticles.plugins.emitters.min.js +2 -2
- package/tsparticles.plugins.polygonMask.js +4 -5
- package/tsparticles.plugins.polygonMask.min.js +1 -1
- package/tsparticles.shape.circle.min.js +1 -1
- package/tsparticles.shape.image.js +4 -5
- package/tsparticles.shape.image.min.js +1 -1
- package/tsparticles.shape.line.min.js +1 -1
- package/tsparticles.shape.polygon.min.js +1 -1
- package/tsparticles.shape.square.min.js +1 -1
- package/tsparticles.shape.star.min.js +1 -1
- package/tsparticles.shape.text.js +4 -5
- package/tsparticles.shape.text.min.js +1 -1
- package/tsparticles.slim.js +4 -6
- package/tsparticles.slim.min.js +2 -2
- package/tsparticles.updater.angle.js +4 -5
- package/tsparticles.updater.angle.min.js +1 -1
- package/tsparticles.updater.color.js +4 -5
- package/tsparticles.updater.color.min.js +1 -1
- package/tsparticles.updater.life.js +4 -5
- package/tsparticles.updater.life.min.js +1 -1
- package/tsparticles.updater.opacity.js +4 -5
- package/tsparticles.updater.opacity.min.js +1 -1
- package/tsparticles.updater.outModes.js +4 -5
- package/tsparticles.updater.outModes.min.js +1 -1
- package/tsparticles.updater.roll.js +4 -5
- package/tsparticles.updater.roll.min.js +1 -1
- package/tsparticles.updater.size.js +4 -6
- package/tsparticles.updater.size.min.js +2 -2
- package/tsparticles.updater.strokeColor.js +4 -5
- package/tsparticles.updater.strokeColor.min.js +1 -1
- package/tsparticles.updater.tilt.js +4 -5
- package/tsparticles.updater.tilt.min.js +1 -1
- package/tsparticles.updater.wobble.js +4 -5
- package/tsparticles.updater.wobble.min.js +1 -1
- package/umd/Core/Canvas.js +1 -4
- package/umd/Core/Particle.d.ts +1 -0
- package/umd/Core/Particle.js +1 -0
- package/umd/Core/Particles.js +2 -1
- package/umd/Plugins/Emitters/EmitterInstance.js +8 -7
- package/umd/Updaters/Size/SizeUpdater.js +0 -1
package/tsparticles.slim.js
CHANGED
|
@@ -2560,10 +2560,7 @@
|
|
|
2560
2560
|
const container = this.container;
|
|
2561
2561
|
const pxRatio = container.retina.pixelRatio;
|
|
2562
2562
|
const size = container.canvas.size;
|
|
2563
|
-
const oldSize = {
|
|
2564
|
-
width: size.width,
|
|
2565
|
-
height: size.height
|
|
2566
|
-
};
|
|
2563
|
+
const oldSize = Object.assign({}, size);
|
|
2567
2564
|
size.width = this.element.offsetWidth * pxRatio;
|
|
2568
2565
|
size.height = this.element.offsetHeight * pxRatio;
|
|
2569
2566
|
this.element.width = size.width;
|
|
@@ -5432,6 +5429,7 @@
|
|
|
5432
5429
|
this.retina = {
|
|
5433
5430
|
maxDistance: {}
|
|
5434
5431
|
};
|
|
5432
|
+
this.ignoresResizeRatio = true;
|
|
5435
5433
|
const pxRatio = container.retina.pixelRatio;
|
|
5436
5434
|
const mainOptions = container.actualOptions;
|
|
5437
5435
|
const particlesOptions = new ParticlesOptions;
|
|
@@ -5867,10 +5865,11 @@
|
|
|
5867
5865
|
}
|
|
5868
5866
|
for (const particle of this.array) {
|
|
5869
5867
|
const resizeFactor = container.canvas.resizeFactor;
|
|
5870
|
-
if (resizeFactor) {
|
|
5868
|
+
if (resizeFactor && !particle.ignoresResizeRatio) {
|
|
5871
5869
|
particle.position.x *= resizeFactor.width;
|
|
5872
5870
|
particle.position.y *= resizeFactor.height;
|
|
5873
5871
|
}
|
|
5872
|
+
particle.ignoresResizeRatio = false;
|
|
5874
5873
|
particle.bubble.inRange = false;
|
|
5875
5874
|
for (const [, plugin] of this.container.plugins) {
|
|
5876
5875
|
if (particle.destroyed) {
|
|
@@ -8584,7 +8583,6 @@
|
|
|
8584
8583
|
}
|
|
8585
8584
|
particle.size.loops++;
|
|
8586
8585
|
} else {
|
|
8587
|
-
console.log("decreasing");
|
|
8588
8586
|
particle.size.value -= sizeVelocity;
|
|
8589
8587
|
}
|
|
8590
8588
|
}
|