tsparticles 1.41.6 → 1.42.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.
- package/Core/Canvas.d.ts +1 -1
- package/Core/Canvas.js +8 -4
- package/Core/Interfaces/ICoordinates.d.ts +8 -0
- package/Core/Interfaces/IParticleGravity.d.ts +5 -0
- package/Core/Interfaces/IParticleGravity.js +2 -0
- package/Core/Interfaces/index.d.ts +1 -0
- package/Core/Interfaces/index.js +1 -0
- package/Core/Particle.d.ts +2 -1
- package/Core/Particle.js +8 -7
- package/Core/Retina.js +7 -7
- package/Core/Utils/ParticlesMover.js +2 -2
- package/Interactions/Particles/Links/LinkInstance.js +1 -1
- package/Options/Classes/AnimatableGradient.d.ts +4 -4
- package/Options/Classes/AnimatableGradient.js +4 -4
- package/Options/Classes/AnimationOptions.d.ts +5 -5
- package/Options/Classes/AnimationOptions.js +3 -2
- package/Options/Classes/ColorAnimation.d.ts +2 -2
- package/Options/Classes/ColorAnimation.js +2 -2
- package/Options/Classes/Particles/Move/Attract.d.ts +2 -2
- package/Options/Classes/Particles/Move/Attract.js +2 -1
- package/Options/Classes/Particles/Move/MoveAngle.d.ts +3 -3
- package/Options/Classes/Particles/Move/MoveAngle.js +3 -2
- package/Options/Classes/Particles/Move/MoveGravity.d.ts +5 -5
- package/Options/Classes/Particles/Move/MoveGravity.js +3 -2
- package/Options/Classes/Particles/Orbit/Orbit.d.ts +4 -4
- package/Options/Classes/Particles/Orbit/Orbit.js +4 -3
- package/Options/Classes/Particles/Repulse/Repulse.d.ts +5 -5
- package/Options/Classes/Particles/Repulse/Repulse.js +5 -4
- package/Options/Classes/Particles/Roll/RollLight.d.ts +2 -2
- package/Options/Classes/Particles/Roll/RollLight.js +2 -1
- package/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +2 -2
- package/Options/Classes/Particles/Rotate/RotateAnimation.js +2 -1
- package/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +2 -2
- package/Options/Classes/Particles/Tilt/TiltAnimation.js +2 -1
- package/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +2 -2
- package/Options/Classes/Particles/Twinkle/TwinkleValues.js +2 -1
- package/Options/Interfaces/IAnimation.d.ts +3 -2
- package/Options/Interfaces/Particles/Move/IAttract.d.ts +3 -2
- package/Options/Interfaces/Particles/Move/IMoveAngle.d.ts +3 -2
- package/Options/Interfaces/Particles/Move/IMoveGravity.d.ts +3 -2
- package/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +4 -3
- package/Options/Interfaces/Particles/Repulse/IRepulse.d.ts +5 -4
- package/Options/Interfaces/Particles/Roll/IRollLight.d.ts +2 -1
- package/Options/Interfaces/Particles/Rotate/IRotateAnimation.d.ts +2 -1
- package/Options/Interfaces/Particles/Tilt/ITiltAnimation.d.ts +2 -1
- package/Options/Interfaces/Particles/Twinkle/ITwinkleValues.d.ts +3 -2
- package/Plugins/Absorbers/AbsorberInstance.js +1 -1
- package/Plugins/Absorbers/Options/Classes/Absorber.d.ts +2 -2
- package/Plugins/Absorbers/Options/Classes/Absorber.js +8 -4
- package/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +2 -2
- package/Plugins/Emitters/EmitterInstance.js +3 -3
- package/Plugins/Emitters/Options/Classes/Emitter.d.ts +2 -2
- package/Plugins/Emitters/Options/Classes/Emitter.js +8 -5
- package/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +2 -2
- package/Updaters/Angle/AngleUpdater.js +2 -1
- package/Updaters/Opacity/OpacityUpdater.js +3 -2
- package/Updaters/Roll/RollUpdater.js +3 -3
- package/Updaters/Tilt/TiltUpdater.js +1 -1
- package/Utils/ColorUtils.js +1 -1
- package/browser/Core/Canvas.d.ts +1 -1
- package/browser/Core/Canvas.js +9 -5
- package/browser/Core/Interfaces/ICoordinates.d.ts +8 -0
- package/browser/Core/Interfaces/IParticleGravity.d.ts +5 -0
- package/browser/Core/Interfaces/IParticleGravity.js +1 -0
- package/browser/Core/Interfaces/index.d.ts +1 -0
- package/browser/Core/Interfaces/index.js +1 -0
- package/browser/Core/Particle.d.ts +2 -1
- package/browser/Core/Particle.js +8 -7
- package/browser/Core/Retina.js +7 -7
- package/browser/Core/Utils/ParticlesMover.js +2 -2
- package/browser/Interactions/Particles/Links/LinkInstance.js +2 -2
- package/browser/Options/Classes/AnimatableGradient.d.ts +4 -4
- package/browser/Options/Classes/AnimatableGradient.js +4 -4
- package/browser/Options/Classes/AnimationOptions.d.ts +5 -5
- package/browser/Options/Classes/AnimationOptions.js +3 -2
- package/browser/Options/Classes/ColorAnimation.d.ts +2 -2
- package/browser/Options/Classes/ColorAnimation.js +2 -2
- package/browser/Options/Classes/Particles/Move/Attract.d.ts +2 -2
- package/browser/Options/Classes/Particles/Move/Attract.js +2 -1
- package/browser/Options/Classes/Particles/Move/MoveAngle.d.ts +3 -3
- package/browser/Options/Classes/Particles/Move/MoveAngle.js +3 -2
- package/browser/Options/Classes/Particles/Move/MoveGravity.d.ts +5 -5
- package/browser/Options/Classes/Particles/Move/MoveGravity.js +3 -2
- package/browser/Options/Classes/Particles/Orbit/Orbit.d.ts +4 -4
- package/browser/Options/Classes/Particles/Orbit/Orbit.js +4 -3
- package/browser/Options/Classes/Particles/Repulse/Repulse.d.ts +5 -5
- package/browser/Options/Classes/Particles/Repulse/Repulse.js +5 -4
- package/browser/Options/Classes/Particles/Roll/RollLight.d.ts +2 -2
- package/browser/Options/Classes/Particles/Roll/RollLight.js +2 -1
- package/browser/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +2 -2
- package/browser/Options/Classes/Particles/Rotate/RotateAnimation.js +2 -1
- package/browser/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +2 -2
- package/browser/Options/Classes/Particles/Tilt/TiltAnimation.js +2 -1
- package/browser/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +2 -2
- package/browser/Options/Classes/Particles/Twinkle/TwinkleValues.js +2 -1
- package/browser/Options/Interfaces/IAnimation.d.ts +3 -2
- package/browser/Options/Interfaces/Particles/Move/IAttract.d.ts +3 -2
- package/browser/Options/Interfaces/Particles/Move/IMoveAngle.d.ts +3 -2
- package/browser/Options/Interfaces/Particles/Move/IMoveGravity.d.ts +3 -2
- package/browser/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +4 -3
- package/browser/Options/Interfaces/Particles/Repulse/IRepulse.d.ts +5 -4
- package/browser/Options/Interfaces/Particles/Roll/IRollLight.d.ts +2 -1
- package/browser/Options/Interfaces/Particles/Rotate/IRotateAnimation.d.ts +2 -1
- package/browser/Options/Interfaces/Particles/Tilt/ITiltAnimation.d.ts +2 -1
- package/browser/Options/Interfaces/Particles/Twinkle/ITwinkleValues.d.ts +3 -2
- package/browser/Plugins/Absorbers/AbsorberInstance.js +1 -1
- package/browser/Plugins/Absorbers/Options/Classes/Absorber.d.ts +2 -2
- package/browser/Plugins/Absorbers/Options/Classes/Absorber.js +8 -4
- package/browser/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +2 -2
- package/browser/Plugins/Emitters/EmitterInstance.js +3 -3
- package/browser/Plugins/Emitters/Options/Classes/Emitter.d.ts +2 -2
- package/browser/Plugins/Emitters/Options/Classes/Emitter.js +8 -5
- package/browser/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +2 -2
- package/browser/Updaters/Angle/AngleUpdater.js +2 -1
- package/browser/Updaters/Opacity/OpacityUpdater.js +3 -2
- package/browser/Updaters/Roll/RollUpdater.js +3 -3
- package/browser/Updaters/Tilt/TiltUpdater.js +1 -1
- package/browser/Utils/ColorUtils.js +2 -2
- package/esm/Core/Canvas.d.ts +1 -1
- package/esm/Core/Canvas.js +9 -5
- package/esm/Core/Interfaces/ICoordinates.d.ts +8 -0
- package/esm/Core/Interfaces/IParticleGravity.d.ts +5 -0
- package/esm/Core/Interfaces/IParticleGravity.js +1 -0
- package/esm/Core/Interfaces/index.d.ts +1 -0
- package/esm/Core/Interfaces/index.js +1 -0
- package/esm/Core/Particle.d.ts +2 -1
- package/esm/Core/Particle.js +8 -7
- package/esm/Core/Retina.js +7 -7
- package/esm/Core/Utils/ParticlesMover.js +2 -2
- package/esm/Interactions/Particles/Links/LinkInstance.js +2 -2
- package/esm/Options/Classes/AnimatableGradient.d.ts +4 -4
- package/esm/Options/Classes/AnimatableGradient.js +4 -4
- package/esm/Options/Classes/AnimationOptions.d.ts +5 -5
- package/esm/Options/Classes/AnimationOptions.js +3 -2
- package/esm/Options/Classes/ColorAnimation.d.ts +2 -2
- package/esm/Options/Classes/ColorAnimation.js +2 -2
- package/esm/Options/Classes/Particles/Move/Attract.d.ts +2 -2
- package/esm/Options/Classes/Particles/Move/Attract.js +2 -1
- package/esm/Options/Classes/Particles/Move/MoveAngle.d.ts +3 -3
- package/esm/Options/Classes/Particles/Move/MoveAngle.js +3 -2
- package/esm/Options/Classes/Particles/Move/MoveGravity.d.ts +5 -5
- package/esm/Options/Classes/Particles/Move/MoveGravity.js +3 -2
- package/esm/Options/Classes/Particles/Orbit/Orbit.d.ts +4 -4
- package/esm/Options/Classes/Particles/Orbit/Orbit.js +4 -3
- package/esm/Options/Classes/Particles/Repulse/Repulse.d.ts +5 -5
- package/esm/Options/Classes/Particles/Repulse/Repulse.js +5 -4
- package/esm/Options/Classes/Particles/Roll/RollLight.d.ts +2 -2
- package/esm/Options/Classes/Particles/Roll/RollLight.js +2 -1
- package/esm/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +2 -2
- package/esm/Options/Classes/Particles/Rotate/RotateAnimation.js +2 -1
- package/esm/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +2 -2
- package/esm/Options/Classes/Particles/Tilt/TiltAnimation.js +2 -1
- package/esm/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +2 -2
- package/esm/Options/Classes/Particles/Twinkle/TwinkleValues.js +2 -1
- package/esm/Options/Interfaces/IAnimation.d.ts +3 -2
- package/esm/Options/Interfaces/Particles/Move/IAttract.d.ts +3 -2
- package/esm/Options/Interfaces/Particles/Move/IMoveAngle.d.ts +3 -2
- package/esm/Options/Interfaces/Particles/Move/IMoveGravity.d.ts +3 -2
- package/esm/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +4 -3
- package/esm/Options/Interfaces/Particles/Repulse/IRepulse.d.ts +5 -4
- package/esm/Options/Interfaces/Particles/Roll/IRollLight.d.ts +2 -1
- package/esm/Options/Interfaces/Particles/Rotate/IRotateAnimation.d.ts +2 -1
- package/esm/Options/Interfaces/Particles/Tilt/ITiltAnimation.d.ts +2 -1
- package/esm/Options/Interfaces/Particles/Twinkle/ITwinkleValues.d.ts +3 -2
- package/esm/Plugins/Absorbers/AbsorberInstance.js +1 -1
- package/esm/Plugins/Absorbers/Options/Classes/Absorber.d.ts +2 -2
- package/esm/Plugins/Absorbers/Options/Classes/Absorber.js +8 -4
- package/esm/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +2 -2
- package/esm/Plugins/Emitters/EmitterInstance.js +3 -3
- package/esm/Plugins/Emitters/Options/Classes/Emitter.d.ts +2 -2
- package/esm/Plugins/Emitters/Options/Classes/Emitter.js +8 -5
- package/esm/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +2 -2
- package/esm/Updaters/Angle/AngleUpdater.js +2 -1
- package/esm/Updaters/Opacity/OpacityUpdater.js +3 -2
- package/esm/Updaters/Roll/RollUpdater.js +3 -3
- package/esm/Updaters/Tilt/TiltUpdater.js +1 -1
- package/esm/Utils/ColorUtils.js +2 -2
- package/package.json +15 -3
- package/report.html +2 -2
- package/report.slim.html +2 -2
- package/scripts/install.js +11 -2
- package/tsparticles.engine.js +48 -45
- package/tsparticles.engine.min.js +2 -2
- package/tsparticles.interaction.external.attract.js +320 -34
- package/tsparticles.interaction.external.attract.min.js +1 -1
- package/tsparticles.interaction.external.bounce.js +320 -34
- package/tsparticles.interaction.external.bounce.min.js +1 -1
- package/tsparticles.interaction.external.bubble.js +320 -34
- package/tsparticles.interaction.external.bubble.min.js +1 -1
- package/tsparticles.interaction.external.connect.js +320 -34
- package/tsparticles.interaction.external.connect.min.js +1 -1
- package/tsparticles.interaction.external.grab.js +320 -34
- package/tsparticles.interaction.external.grab.min.js +1 -1
- package/tsparticles.interaction.external.repulse.js +320 -34
- package/tsparticles.interaction.external.repulse.min.js +1 -1
- package/tsparticles.interaction.external.trail.js +320 -34
- package/tsparticles.interaction.external.trail.min.js +1 -1
- package/tsparticles.interaction.particles.attract.js +320 -34
- package/tsparticles.interaction.particles.attract.min.js +1 -1
- package/tsparticles.interaction.particles.collisions.js +320 -34
- package/tsparticles.interaction.particles.collisions.min.js +1 -1
- package/tsparticles.interaction.particles.links.js +321 -35
- package/tsparticles.interaction.particles.links.min.js +2 -2
- package/tsparticles.js +74 -65
- package/tsparticles.min.js +2 -2
- package/tsparticles.pathseg.min.js +1 -1
- package/tsparticles.plugins.absorbers.js +328 -39
- package/tsparticles.plugins.absorbers.min.js +2 -2
- package/tsparticles.plugins.emitters.js +431 -142
- package/tsparticles.plugins.emitters.min.js +2 -2
- package/tsparticles.plugins.polygonMask.js +320 -34
- package/tsparticles.plugins.polygonMask.min.js +1 -1
- package/tsparticles.shape.circle.min.js +1 -1
- package/tsparticles.shape.image.js +320 -34
- 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 +320 -34
- package/tsparticles.shape.text.min.js +1 -1
- package/tsparticles.slim.js +52 -49
- package/tsparticles.slim.min.js +2 -2
- package/tsparticles.updater.angle.js +321 -35
- package/tsparticles.updater.angle.min.js +2 -2
- package/tsparticles.updater.color.js +320 -34
- package/tsparticles.updater.color.min.js +2 -2
- package/tsparticles.updater.life.js +320 -34
- package/tsparticles.updater.life.min.js +1 -1
- package/tsparticles.updater.opacity.js +322 -36
- package/tsparticles.updater.opacity.min.js +2 -2
- package/tsparticles.updater.outModes.js +320 -34
- package/tsparticles.updater.outModes.min.js +1 -1
- package/tsparticles.updater.roll.js +323 -37
- package/tsparticles.updater.roll.min.js +2 -2
- package/tsparticles.updater.size.js +320 -34
- package/tsparticles.updater.size.min.js +1 -1
- package/tsparticles.updater.strokeColor.js +320 -34
- package/tsparticles.updater.strokeColor.min.js +2 -2
- package/tsparticles.updater.tilt.js +321 -35
- package/tsparticles.updater.tilt.min.js +2 -2
- package/tsparticles.updater.wobble.js +320 -34
- package/tsparticles.updater.wobble.min.js +1 -1
- package/umd/Core/Canvas.d.ts +1 -1
- package/umd/Core/Canvas.js +8 -4
- package/umd/Core/Interfaces/ICoordinates.d.ts +8 -0
- package/umd/Core/Interfaces/IParticleGravity.d.ts +5 -0
- package/umd/Core/Interfaces/IParticleGravity.js +12 -0
- package/umd/Core/Interfaces/index.d.ts +1 -0
- package/umd/Core/Interfaces/index.js +2 -1
- package/umd/Core/Particle.d.ts +2 -1
- package/umd/Core/Particle.js +8 -7
- package/umd/Core/Retina.js +7 -7
- package/umd/Core/Utils/ParticlesMover.js +2 -2
- package/umd/Interactions/Particles/Links/LinkInstance.js +1 -1
- package/umd/Options/Classes/AnimatableGradient.d.ts +4 -4
- package/umd/Options/Classes/AnimatableGradient.js +4 -4
- package/umd/Options/Classes/AnimationOptions.d.ts +5 -5
- package/umd/Options/Classes/AnimationOptions.js +4 -3
- package/umd/Options/Classes/ColorAnimation.d.ts +2 -2
- package/umd/Options/Classes/ColorAnimation.js +2 -2
- package/umd/Options/Classes/Particles/Move/Attract.d.ts +2 -2
- package/umd/Options/Classes/Particles/Move/Attract.js +3 -2
- package/umd/Options/Classes/Particles/Move/MoveAngle.d.ts +3 -3
- package/umd/Options/Classes/Particles/Move/MoveAngle.js +4 -3
- package/umd/Options/Classes/Particles/Move/MoveGravity.d.ts +5 -5
- package/umd/Options/Classes/Particles/Move/MoveGravity.js +4 -3
- package/umd/Options/Classes/Particles/Orbit/Orbit.d.ts +4 -4
- package/umd/Options/Classes/Particles/Orbit/Orbit.js +5 -4
- package/umd/Options/Classes/Particles/Repulse/Repulse.d.ts +5 -5
- package/umd/Options/Classes/Particles/Repulse/Repulse.js +6 -5
- package/umd/Options/Classes/Particles/Roll/RollLight.d.ts +2 -2
- package/umd/Options/Classes/Particles/Roll/RollLight.js +3 -2
- package/umd/Options/Classes/Particles/Rotate/RotateAnimation.d.ts +2 -2
- package/umd/Options/Classes/Particles/Rotate/RotateAnimation.js +3 -2
- package/umd/Options/Classes/Particles/Tilt/TiltAnimation.d.ts +2 -2
- package/umd/Options/Classes/Particles/Tilt/TiltAnimation.js +3 -2
- package/umd/Options/Classes/Particles/Twinkle/TwinkleValues.d.ts +2 -2
- package/umd/Options/Classes/Particles/Twinkle/TwinkleValues.js +3 -2
- package/umd/Options/Interfaces/IAnimation.d.ts +3 -2
- package/umd/Options/Interfaces/Particles/Move/IAttract.d.ts +3 -2
- package/umd/Options/Interfaces/Particles/Move/IMoveAngle.d.ts +3 -2
- package/umd/Options/Interfaces/Particles/Move/IMoveGravity.d.ts +3 -2
- package/umd/Options/Interfaces/Particles/Orbit/IOrbit.d.ts +4 -3
- package/umd/Options/Interfaces/Particles/Repulse/IRepulse.d.ts +5 -4
- package/umd/Options/Interfaces/Particles/Roll/IRollLight.d.ts +2 -1
- package/umd/Options/Interfaces/Particles/Rotate/IRotateAnimation.d.ts +2 -1
- package/umd/Options/Interfaces/Particles/Tilt/ITiltAnimation.d.ts +2 -1
- package/umd/Options/Interfaces/Particles/Twinkle/ITwinkleValues.d.ts +3 -2
- package/umd/Plugins/Absorbers/AbsorberInstance.js +1 -1
- package/umd/Plugins/Absorbers/Options/Classes/Absorber.d.ts +2 -2
- package/umd/Plugins/Absorbers/Options/Classes/Absorber.js +9 -5
- package/umd/Plugins/Absorbers/Options/Interfaces/IAbsorber.d.ts +2 -2
- package/umd/Plugins/Emitters/EmitterInstance.js +3 -3
- package/umd/Plugins/Emitters/Options/Classes/Emitter.d.ts +2 -2
- package/umd/Plugins/Emitters/Options/Classes/Emitter.js +9 -6
- package/umd/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +2 -2
- package/umd/Updaters/Angle/AngleUpdater.js +2 -1
- package/umd/Updaters/Opacity/OpacityUpdater.js +3 -2
- package/umd/Updaters/Roll/RollUpdater.js +3 -3
- package/umd/Updaters/Tilt/TiltUpdater.js +1 -1
- package/umd/Utils/ColorUtils.js +1 -1
package/tsparticles.js
CHANGED
|
@@ -1352,7 +1352,7 @@
|
|
|
1352
1352
|
function setColorAnimation(colorValue, colorAnimation, reduceFactor) {
|
|
1353
1353
|
colorValue.enable = colorAnimation.enable;
|
|
1354
1354
|
if (colorValue.enable) {
|
|
1355
|
-
colorValue.velocity = colorAnimation.speed / 100 * reduceFactor;
|
|
1355
|
+
colorValue.velocity = getRangeValue(colorAnimation.speed) / 100 * reduceFactor;
|
|
1356
1356
|
if (colorAnimation.sync) {
|
|
1357
1357
|
return;
|
|
1358
1358
|
}
|
|
@@ -2302,7 +2302,7 @@
|
|
|
2302
2302
|
}
|
|
2303
2303
|
const container = this.container, slowFactor = this.getProximitySpeedFactor(particle), baseSpeed = ((_a = (_d = particle.retina).moveSpeed) !== null && _a !== void 0 ? _a : _d.moveSpeed = getRangeValue(moveOptions.speed) * container.retina.pixelRatio) * container.retina.reduceFactor, moveDrift = (_b = (_e = particle.retina).moveDrift) !== null && _b !== void 0 ? _b : _e.moveDrift = getRangeValue(particle.options.move.drift) * container.retina.pixelRatio, maxSize = getRangeMax(particleOptions.size.value) * container.retina.pixelRatio, sizeFactor = moveOptions.size ? particle.getRadius() / maxSize : 1, diffFactor = 2, speedFactor = sizeFactor * slowFactor * (delta.factor || 1) / diffFactor, moveSpeed = baseSpeed * speedFactor;
|
|
2304
2304
|
this.applyPath(particle, delta);
|
|
2305
|
-
const gravityOptions =
|
|
2305
|
+
const gravityOptions = particle.gravity;
|
|
2306
2306
|
const gravityFactor = gravityOptions.enable && gravityOptions.inverse ? -1 : 1;
|
|
2307
2307
|
if (gravityOptions.enable && moveSpeed) {
|
|
2308
2308
|
particle.velocity.y += gravityFactor * (gravityOptions.acceleration * delta.factor) / (60 * moveSpeed);
|
|
@@ -2316,7 +2316,7 @@
|
|
|
2316
2316
|
}
|
|
2317
2317
|
const velocity = particle.velocity.mult(moveSpeed);
|
|
2318
2318
|
const maxSpeed = (_c = particle.retina.maxSpeed) !== null && _c !== void 0 ? _c : container.retina.maxSpeed;
|
|
2319
|
-
if (gravityOptions.enable &&
|
|
2319
|
+
if (gravityOptions.enable && maxSpeed > 0 && (!gravityOptions.inverse && velocity.y >= 0 && velocity.y >= maxSpeed || gravityOptions.inverse && velocity.y <= 0 && velocity.y <= -maxSpeed)) {
|
|
2320
2320
|
velocity.y = gravityFactor * maxSpeed;
|
|
2321
2321
|
if (moveSpeed) {
|
|
2322
2322
|
particle.velocity.y = velocity.y / moveSpeed;
|
|
@@ -2780,9 +2780,9 @@
|
|
|
2780
2780
|
paint() {
|
|
2781
2781
|
const options = this.container.actualOptions;
|
|
2782
2782
|
this.draw((ctx => {
|
|
2783
|
-
if (options.backgroundMask.enable && options.backgroundMask.cover
|
|
2783
|
+
if (options.backgroundMask.enable && options.backgroundMask.cover) {
|
|
2784
2784
|
clear(ctx, this.size);
|
|
2785
|
-
this.paintBase(
|
|
2785
|
+
this.paintBase(this.coverColorStyle);
|
|
2786
2786
|
} else {
|
|
2787
2787
|
this.paintBase();
|
|
2788
2788
|
}
|
|
@@ -2884,7 +2884,7 @@
|
|
|
2884
2884
|
const zIndexOptions = particle.options.zIndex;
|
|
2885
2885
|
const zOpacityFactor = (1 - particle.zIndexFactor) ** zIndexOptions.opacityRate;
|
|
2886
2886
|
const radius = particle.getRadius();
|
|
2887
|
-
const opacity = twinkling ? twinkle.opacity : (_d = (_b = particle.bubble.opacity) !== null && _b !== void 0 ? _b : (_c = particle.opacity) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : 1;
|
|
2887
|
+
const opacity = twinkling ? getRangeValue(twinkle.opacity) : (_d = (_b = particle.bubble.opacity) !== null && _b !== void 0 ? _b : (_c = particle.opacity) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : 1;
|
|
2888
2888
|
const strokeOpacity = (_f = (_e = particle.stroke) === null || _e === void 0 ? void 0 : _e.opacity) !== null && _f !== void 0 ? _f : opacity;
|
|
2889
2889
|
const zOpacity = opacity * zOpacityFactor;
|
|
2890
2890
|
const fillColorValue = fColor ? getStyleFromHsl(fColor, zOpacity) : undefined;
|
|
@@ -2953,12 +2953,14 @@
|
|
|
2953
2953
|
const color = cover.color;
|
|
2954
2954
|
const coverRgb = colorToRgb(color);
|
|
2955
2955
|
if (coverRgb) {
|
|
2956
|
-
|
|
2956
|
+
const coverColor = {
|
|
2957
2957
|
r: coverRgb.r,
|
|
2958
2958
|
g: coverRgb.g,
|
|
2959
2959
|
b: coverRgb.b,
|
|
2960
2960
|
a: cover.opacity
|
|
2961
2961
|
};
|
|
2962
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
2963
|
+
console.log(this.coverColorStyle);
|
|
2962
2964
|
}
|
|
2963
2965
|
}
|
|
2964
2966
|
initTrail() {
|
|
@@ -3902,7 +3904,7 @@
|
|
|
3902
3904
|
return;
|
|
3903
3905
|
}
|
|
3904
3906
|
if (data.count !== undefined) {
|
|
3905
|
-
this.count = data.count;
|
|
3907
|
+
this.count = setRangeValue(data.count);
|
|
3906
3908
|
}
|
|
3907
3909
|
if (data.enable !== undefined) {
|
|
3908
3910
|
this.enable = data.enable;
|
|
@@ -3911,7 +3913,7 @@
|
|
|
3911
3913
|
this.offset = setRangeValue(data.offset);
|
|
3912
3914
|
}
|
|
3913
3915
|
if (data.speed !== undefined) {
|
|
3914
|
-
this.speed = data.speed;
|
|
3916
|
+
this.speed = setRangeValue(data.speed);
|
|
3915
3917
|
}
|
|
3916
3918
|
if (data.sync !== undefined) {
|
|
3917
3919
|
this.sync = data.sync;
|
|
@@ -4059,13 +4061,13 @@
|
|
|
4059
4061
|
return;
|
|
4060
4062
|
}
|
|
4061
4063
|
if (data.count !== undefined) {
|
|
4062
|
-
this.count = data.count;
|
|
4064
|
+
this.count = setRangeValue(data.count);
|
|
4063
4065
|
}
|
|
4064
4066
|
if (data.enable !== undefined) {
|
|
4065
4067
|
this.enable = data.enable;
|
|
4066
4068
|
}
|
|
4067
4069
|
if (data.speed !== undefined) {
|
|
4068
|
-
this.speed = data.speed;
|
|
4070
|
+
this.speed = setRangeValue(data.speed);
|
|
4069
4071
|
}
|
|
4070
4072
|
if (data.sync !== undefined) {
|
|
4071
4073
|
this.sync = data.sync;
|
|
@@ -4085,13 +4087,13 @@
|
|
|
4085
4087
|
return;
|
|
4086
4088
|
}
|
|
4087
4089
|
if (data.count !== undefined) {
|
|
4088
|
-
this.count = data.count;
|
|
4090
|
+
this.count = setRangeValue(data.count);
|
|
4089
4091
|
}
|
|
4090
4092
|
if (data.enable !== undefined) {
|
|
4091
4093
|
this.enable = data.enable;
|
|
4092
4094
|
}
|
|
4093
4095
|
if (data.speed !== undefined) {
|
|
4094
|
-
this.speed = data.speed;
|
|
4096
|
+
this.speed = setRangeValue(data.speed);
|
|
4095
4097
|
}
|
|
4096
4098
|
if (data.sync !== undefined) {
|
|
4097
4099
|
this.sync = data.sync;
|
|
@@ -4417,7 +4419,7 @@
|
|
|
4417
4419
|
return;
|
|
4418
4420
|
}
|
|
4419
4421
|
if (data.distance !== undefined) {
|
|
4420
|
-
this.distance = data.distance;
|
|
4422
|
+
this.distance = setRangeValue(data.distance);
|
|
4421
4423
|
}
|
|
4422
4424
|
if (data.enable !== undefined) {
|
|
4423
4425
|
this.enable = data.enable;
|
|
@@ -4442,10 +4444,10 @@
|
|
|
4442
4444
|
return;
|
|
4443
4445
|
}
|
|
4444
4446
|
if (data.offset !== undefined) {
|
|
4445
|
-
this.offset = data.offset;
|
|
4447
|
+
this.offset = setRangeValue(data.offset);
|
|
4446
4448
|
}
|
|
4447
4449
|
if (data.value !== undefined) {
|
|
4448
|
-
this.value = data.value;
|
|
4450
|
+
this.value = setRangeValue(data.value);
|
|
4449
4451
|
}
|
|
4450
4452
|
}
|
|
4451
4453
|
}
|
|
@@ -4461,7 +4463,7 @@
|
|
|
4461
4463
|
return;
|
|
4462
4464
|
}
|
|
4463
4465
|
if (data.acceleration !== undefined) {
|
|
4464
|
-
this.acceleration = data.acceleration;
|
|
4466
|
+
this.acceleration = setRangeValue(data.acceleration);
|
|
4465
4467
|
}
|
|
4466
4468
|
if (data.enable !== undefined) {
|
|
4467
4469
|
this.enable = data.enable;
|
|
@@ -4470,7 +4472,7 @@
|
|
|
4470
4472
|
this.inverse = data.inverse;
|
|
4471
4473
|
}
|
|
4472
4474
|
if (data.maxSpeed !== undefined) {
|
|
4473
|
-
this.maxSpeed = data.maxSpeed;
|
|
4475
|
+
this.maxSpeed = setRangeValue(data.maxSpeed);
|
|
4474
4476
|
}
|
|
4475
4477
|
}
|
|
4476
4478
|
}
|
|
@@ -4685,13 +4687,13 @@
|
|
|
4685
4687
|
return;
|
|
4686
4688
|
}
|
|
4687
4689
|
if (data.count !== undefined) {
|
|
4688
|
-
this.count = data.count;
|
|
4690
|
+
this.count = setRangeValue(data.count);
|
|
4689
4691
|
}
|
|
4690
4692
|
if (data.enable !== undefined) {
|
|
4691
4693
|
this.enable = data.enable;
|
|
4692
4694
|
}
|
|
4693
4695
|
if (data.speed !== undefined) {
|
|
4694
|
-
this.speed = data.speed;
|
|
4696
|
+
this.speed = setRangeValue(data.speed);
|
|
4695
4697
|
}
|
|
4696
4698
|
if (data.sync !== undefined) {
|
|
4697
4699
|
this.sync = data.sync;
|
|
@@ -4795,13 +4797,13 @@
|
|
|
4795
4797
|
this.enable = data.enable;
|
|
4796
4798
|
}
|
|
4797
4799
|
if (data.opacity !== undefined) {
|
|
4798
|
-
this.opacity = data.opacity;
|
|
4800
|
+
this.opacity = setRangeValue(data.opacity);
|
|
4799
4801
|
}
|
|
4800
4802
|
if (data.width !== undefined) {
|
|
4801
|
-
this.width = data.width;
|
|
4803
|
+
this.width = setRangeValue(data.width);
|
|
4802
4804
|
}
|
|
4803
4805
|
if (data.radius !== undefined) {
|
|
4804
|
-
this.radius = data.radius;
|
|
4806
|
+
this.radius = setRangeValue(data.radius);
|
|
4805
4807
|
}
|
|
4806
4808
|
if (data.color !== undefined) {
|
|
4807
4809
|
this.color = OptionsColor.create(this.color, data.color);
|
|
@@ -4882,16 +4884,16 @@
|
|
|
4882
4884
|
this.enabled = data.enabled;
|
|
4883
4885
|
}
|
|
4884
4886
|
if (data.distance !== undefined) {
|
|
4885
|
-
this.distance = data.distance;
|
|
4887
|
+
this.distance = setRangeValue(data.distance);
|
|
4886
4888
|
}
|
|
4887
4889
|
if (data.duration !== undefined) {
|
|
4888
|
-
this.duration = data.duration;
|
|
4890
|
+
this.duration = setRangeValue(data.duration);
|
|
4889
4891
|
}
|
|
4890
4892
|
if (data.factor !== undefined) {
|
|
4891
|
-
this.factor = data.factor;
|
|
4893
|
+
this.factor = setRangeValue(data.factor);
|
|
4892
4894
|
}
|
|
4893
4895
|
if (data.speed !== undefined) {
|
|
4894
|
-
this.speed = data.speed;
|
|
4896
|
+
this.speed = setRangeValue(data.speed);
|
|
4895
4897
|
}
|
|
4896
4898
|
}
|
|
4897
4899
|
}
|
|
@@ -4908,7 +4910,7 @@
|
|
|
4908
4910
|
this.enable = data.enable;
|
|
4909
4911
|
}
|
|
4910
4912
|
if (data.value !== undefined) {
|
|
4911
|
-
this.value = data.value;
|
|
4913
|
+
this.value = setRangeValue(data.value);
|
|
4912
4914
|
}
|
|
4913
4915
|
}
|
|
4914
4916
|
}
|
|
@@ -4954,7 +4956,7 @@
|
|
|
4954
4956
|
this.enable = data.enable;
|
|
4955
4957
|
}
|
|
4956
4958
|
if (data.speed !== undefined) {
|
|
4957
|
-
this.speed = data.speed;
|
|
4959
|
+
this.speed = setRangeValue(data.speed);
|
|
4958
4960
|
}
|
|
4959
4961
|
if (data.sync !== undefined) {
|
|
4960
4962
|
this.sync = data.sync;
|
|
@@ -5210,7 +5212,7 @@
|
|
|
5210
5212
|
this.enable = data.enable;
|
|
5211
5213
|
}
|
|
5212
5214
|
if (data.speed !== undefined) {
|
|
5213
|
-
this.speed = data.speed;
|
|
5215
|
+
this.speed = setRangeValue(data.speed);
|
|
5214
5216
|
}
|
|
5215
5217
|
if (data.sync !== undefined) {
|
|
5216
5218
|
this.sync = data.sync;
|
|
@@ -5259,7 +5261,7 @@
|
|
|
5259
5261
|
this.frequency = data.frequency;
|
|
5260
5262
|
}
|
|
5261
5263
|
if (data.opacity !== undefined) {
|
|
5262
|
-
this.opacity = data.opacity;
|
|
5264
|
+
this.opacity = setRangeValue(data.opacity);
|
|
5263
5265
|
}
|
|
5264
5266
|
}
|
|
5265
5267
|
}
|
|
@@ -5734,7 +5736,7 @@
|
|
|
5734
5736
|
max: getRangeMax(sizeRange) * pxRatio,
|
|
5735
5737
|
min: getRangeMin(sizeRange) * pxRatio,
|
|
5736
5738
|
loops: 0,
|
|
5737
|
-
maxLoops: sizeOptions.animation.count
|
|
5739
|
+
maxLoops: getRangeValue(sizeOptions.animation.count)
|
|
5738
5740
|
};
|
|
5739
5741
|
const sizeAnimation = sizeOptions.animation;
|
|
5740
5742
|
if (sizeAnimation.enable) {
|
|
@@ -5768,6 +5770,12 @@
|
|
|
5768
5770
|
this.initialVelocity = this.calculateVelocity();
|
|
5769
5771
|
this.velocity = this.initialVelocity.copy();
|
|
5770
5772
|
this.moveDecay = 1 - getRangeValue(this.options.move.decay);
|
|
5773
|
+
const gravityOptions = this.options.move.gravity;
|
|
5774
|
+
this.gravity = {
|
|
5775
|
+
enable: gravityOptions.enable,
|
|
5776
|
+
acceleration: getRangeValue(gravityOptions.acceleration),
|
|
5777
|
+
inverse: gravityOptions.inverse
|
|
5778
|
+
};
|
|
5771
5779
|
this.position = this.calcPosition(container, position, clamp(zIndexValue, 0, container.zLayers));
|
|
5772
5780
|
this.initialPosition = this.position.copy();
|
|
5773
5781
|
this.offset = Vector.origin;
|
|
@@ -5975,12 +5983,7 @@
|
|
|
5975
5983
|
return overlaps;
|
|
5976
5984
|
}
|
|
5977
5985
|
calculateVelocity() {
|
|
5978
|
-
const baseVelocity = getParticleBaseVelocity(this.direction)
|
|
5979
|
-
const res = baseVelocity.copy();
|
|
5980
|
-
const moveOptions = this.options.move;
|
|
5981
|
-
const rad = Math.PI / 180 * moveOptions.angle.value;
|
|
5982
|
-
const radOffset = Math.PI / 180 * moveOptions.angle.offset;
|
|
5983
|
-
const range = {
|
|
5986
|
+
const baseVelocity = getParticleBaseVelocity(this.direction), res = baseVelocity.copy(), moveOptions = this.options.move, rad = Math.PI / 180 * getRangeValue(moveOptions.angle.value), radOffset = Math.PI / 180 * getRangeValue(moveOptions.angle.offset), range = {
|
|
5984
5987
|
left: radOffset - rad / 2,
|
|
5985
5988
|
right: radOffset + rad / 2
|
|
5986
5989
|
};
|
|
@@ -6370,13 +6373,13 @@
|
|
|
6370
6373
|
container.canvas.size.height = element.offsetHeight * ratio;
|
|
6371
6374
|
}
|
|
6372
6375
|
const particles = options.particles;
|
|
6373
|
-
this.attractDistance = particles.move.attract.distance * ratio;
|
|
6376
|
+
this.attractDistance = getRangeValue(particles.move.attract.distance) * ratio;
|
|
6374
6377
|
this.linksDistance = particles.links.distance * ratio;
|
|
6375
6378
|
this.linksWidth = particles.links.width * ratio;
|
|
6376
|
-
this.sizeAnimationSpeed = particles.size.animation.speed * ratio;
|
|
6377
|
-
this.maxSpeed = particles.move.gravity.maxSpeed * ratio;
|
|
6379
|
+
this.sizeAnimationSpeed = getRangeValue(particles.size.animation.speed) * ratio;
|
|
6380
|
+
this.maxSpeed = getRangeValue(particles.move.gravity.maxSpeed) * ratio;
|
|
6378
6381
|
if (particles.orbit.radius !== undefined) {
|
|
6379
|
-
this.orbitRadius = particles.orbit.radius * this.container.retina.pixelRatio;
|
|
6382
|
+
this.orbitRadius = getRangeValue(particles.orbit.radius) * this.container.retina.pixelRatio;
|
|
6380
6383
|
}
|
|
6381
6384
|
const modes = options.interactivity.modes;
|
|
6382
6385
|
this.connectModeDistance = modes.connect.distance * ratio;
|
|
@@ -6396,19 +6399,19 @@
|
|
|
6396
6399
|
const ratio = this.pixelRatio;
|
|
6397
6400
|
const moveDistance = options.move.distance;
|
|
6398
6401
|
const props = particle.retina;
|
|
6399
|
-
props.attractDistance = options.move.attract.distance * ratio;
|
|
6402
|
+
props.attractDistance = getRangeValue(options.move.attract.distance) * ratio;
|
|
6400
6403
|
props.linksDistance = options.links.distance * ratio;
|
|
6401
6404
|
props.linksWidth = options.links.width * ratio;
|
|
6402
6405
|
props.moveDrift = getRangeValue(options.move.drift) * ratio;
|
|
6403
6406
|
props.moveSpeed = getRangeValue(options.move.speed) * ratio;
|
|
6404
|
-
props.sizeAnimationSpeed = options.size.animation.speed * ratio;
|
|
6407
|
+
props.sizeAnimationSpeed = getRangeValue(options.size.animation.speed) * ratio;
|
|
6405
6408
|
if (particle.spin) {
|
|
6406
6409
|
props.spinAcceleration = getRangeValue(options.move.spin.acceleration) * ratio;
|
|
6407
6410
|
}
|
|
6408
6411
|
const maxDistance = props.maxDistance;
|
|
6409
6412
|
maxDistance.horizontal = moveDistance.horizontal !== undefined ? moveDistance.horizontal * ratio : undefined;
|
|
6410
6413
|
maxDistance.vertical = moveDistance.vertical !== undefined ? moveDistance.vertical * ratio : undefined;
|
|
6411
|
-
props.maxSpeed = options.move.gravity.maxSpeed * ratio;
|
|
6414
|
+
props.maxSpeed = getRangeValue(options.move.gravity.maxSpeed) * ratio;
|
|
6412
6415
|
}
|
|
6413
6416
|
handleMotionChange(mediaQuery) {
|
|
6414
6417
|
const options = this.container.actualOptions;
|
|
@@ -7162,10 +7165,13 @@
|
|
|
7162
7165
|
this.opacity = data.opacity;
|
|
7163
7166
|
}
|
|
7164
7167
|
if (data.position !== undefined) {
|
|
7165
|
-
this.position = {
|
|
7166
|
-
|
|
7167
|
-
|
|
7168
|
-
}
|
|
7168
|
+
this.position = {};
|
|
7169
|
+
if (data.position.x !== undefined) {
|
|
7170
|
+
this.position.x = setRangeValue(data.position.x);
|
|
7171
|
+
}
|
|
7172
|
+
if (data.position.y !== undefined) {
|
|
7173
|
+
this.position.y = setRangeValue(data.position.y);
|
|
7174
|
+
}
|
|
7169
7175
|
}
|
|
7170
7176
|
if (data.size !== undefined) {
|
|
7171
7177
|
this.size.load(data.size);
|
|
@@ -7270,7 +7276,7 @@
|
|
|
7270
7276
|
var _a, _b;
|
|
7271
7277
|
const container = this.container;
|
|
7272
7278
|
const percentPosition = this.options.position;
|
|
7273
|
-
return Vector.create(((_a = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.x) !== null && _a !== void 0 ? _a : Math.random() * 100) / 100 * container.canvas.size.width, ((_b = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.y) !== null && _b !== void 0 ? _b : Math.random() * 100) / 100 * container.canvas.size.height);
|
|
7279
|
+
return Vector.create(getRangeValue((_a = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.x) !== null && _a !== void 0 ? _a : Math.random() * 100) / 100 * container.canvas.size.width, getRangeValue((_b = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.y) !== null && _b !== void 0 ? _b : Math.random() * 100) / 100 * container.canvas.size.height);
|
|
7274
7280
|
}
|
|
7275
7281
|
updateParticlePosition(particle, v) {
|
|
7276
7282
|
var _a;
|
|
@@ -7617,10 +7623,13 @@
|
|
|
7617
7623
|
this.shape = data.shape;
|
|
7618
7624
|
}
|
|
7619
7625
|
if (data.position !== undefined) {
|
|
7620
|
-
this.position = {
|
|
7621
|
-
|
|
7622
|
-
|
|
7623
|
-
}
|
|
7626
|
+
this.position = {};
|
|
7627
|
+
if (data.position.x !== undefined) {
|
|
7628
|
+
this.position.x = setRangeValue(data.position.x);
|
|
7629
|
+
}
|
|
7630
|
+
if (data.position.y !== undefined) {
|
|
7631
|
+
this.position.y = setRangeValue(data.position.y);
|
|
7632
|
+
}
|
|
7624
7633
|
}
|
|
7625
7634
|
if (data.spawnColor !== undefined) {
|
|
7626
7635
|
if (this.spawnColor === undefined) {
|
|
@@ -7826,8 +7835,8 @@
|
|
|
7826
7835
|
const container = this.container;
|
|
7827
7836
|
const percentPosition = this.options.position;
|
|
7828
7837
|
return {
|
|
7829
|
-
x: ((_a = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.x) !== null && _a !== void 0 ? _a : Math.random() * 100) / 100 * container.canvas.size.width,
|
|
7830
|
-
y: ((_b = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.y) !== null && _b !== void 0 ? _b : Math.random() * 100) / 100 * container.canvas.size.height
|
|
7838
|
+
x: getRangeValue((_a = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.x) !== null && _a !== void 0 ? _a : Math.random() * 100) / 100 * container.canvas.size.width,
|
|
7839
|
+
y: getRangeValue((_b = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.y) !== null && _b !== void 0 ? _b : Math.random() * 100) / 100 * container.canvas.size.height
|
|
7831
7840
|
};
|
|
7832
7841
|
}
|
|
7833
7842
|
emit() {
|
|
@@ -7875,7 +7884,7 @@
|
|
|
7875
7884
|
const colorOffset = randomInRange(animation.offset);
|
|
7876
7885
|
const delay = getRangeValue(this.options.rate.delay);
|
|
7877
7886
|
const emitFactor = 1e3 * delay / container.retina.reduceFactor;
|
|
7878
|
-
const colorSpeed = (_a = animation.speed) !== null && _a !== void 0 ? _a : 0;
|
|
7887
|
+
const colorSpeed = getRangeValue((_a = animation.speed) !== null && _a !== void 0 ? _a : 0);
|
|
7879
7888
|
return (initValue + colorSpeed * container.fpsLimit / emitFactor + colorOffset * 3.6) % maxValue;
|
|
7880
7889
|
}
|
|
7881
7890
|
}
|
|
@@ -8924,17 +8933,17 @@
|
|
|
8924
8933
|
const alterType = Math.random() >= .5 ? "darken" : "enlighten";
|
|
8925
8934
|
particle.roll.alter = {
|
|
8926
8935
|
type: alterType,
|
|
8927
|
-
value: alterType === "darken" ? rollOpt.darken.value : rollOpt.enlighten.value
|
|
8936
|
+
value: getRangeValue(alterType === "darken" ? rollOpt.darken.value : rollOpt.enlighten.value)
|
|
8928
8937
|
};
|
|
8929
8938
|
} else if (rollOpt.darken.enable) {
|
|
8930
8939
|
particle.roll.alter = {
|
|
8931
8940
|
type: "darken",
|
|
8932
|
-
value: rollOpt.darken.value
|
|
8941
|
+
value: getRangeValue(rollOpt.darken.value)
|
|
8933
8942
|
};
|
|
8934
8943
|
} else if (rollOpt.enlighten.enable) {
|
|
8935
8944
|
particle.roll.alter = {
|
|
8936
8945
|
type: "enlighten",
|
|
8937
|
-
value: rollOpt.enlighten.value
|
|
8946
|
+
value: getRangeValue(rollOpt.enlighten.value)
|
|
8938
8947
|
};
|
|
8939
8948
|
}
|
|
8940
8949
|
} else {
|
|
@@ -9015,7 +9024,7 @@
|
|
|
9015
9024
|
}
|
|
9016
9025
|
const rotateAnimation = particle.options.rotate.animation;
|
|
9017
9026
|
if (rotateAnimation.enable) {
|
|
9018
|
-
particle.rotate.velocity = rotateAnimation.speed / 360 * this.container.retina.reduceFactor;
|
|
9027
|
+
particle.rotate.velocity = getRangeValue(rotateAnimation.speed) / 360 * this.container.retina.reduceFactor;
|
|
9019
9028
|
if (!rotateAnimation.sync) {
|
|
9020
9029
|
particle.rotate.velocity *= Math.random();
|
|
9021
9030
|
}
|
|
@@ -9998,7 +10007,7 @@
|
|
|
9998
10007
|
min: getRangeMin(opacityOptions.value),
|
|
9999
10008
|
value: getRangeValue(opacityOptions.value),
|
|
10000
10009
|
loops: 0,
|
|
10001
|
-
maxLoops: opacityOptions.animation.count
|
|
10010
|
+
maxLoops: getRangeValue(opacityOptions.animation.count)
|
|
10002
10011
|
};
|
|
10003
10012
|
const opacityAnimation = opacityOptions.animation;
|
|
10004
10013
|
if (opacityAnimation.enable) {
|
|
@@ -10023,7 +10032,7 @@
|
|
|
10023
10032
|
particle.opacity.status = 1;
|
|
10024
10033
|
break;
|
|
10025
10034
|
}
|
|
10026
|
-
particle.opacity.velocity = opacityAnimation.speed / 100 * this.container.retina.reduceFactor;
|
|
10035
|
+
particle.opacity.velocity = getRangeValue(opacityAnimation.speed) / 100 * this.container.retina.reduceFactor;
|
|
10027
10036
|
if (!opacityAnimation.sync) {
|
|
10028
10037
|
particle.opacity.velocity *= Math.random();
|
|
10029
10038
|
}
|
|
@@ -10551,7 +10560,7 @@
|
|
|
10551
10560
|
const twinkling = Math.random() < twinkleFreq;
|
|
10552
10561
|
if (twinkling && twinkleRgb !== undefined) {
|
|
10553
10562
|
colorLine = twinkleRgb;
|
|
10554
|
-
opacity = twinkle.opacity;
|
|
10563
|
+
opacity = getRangeValue(twinkle.opacity);
|
|
10555
10564
|
}
|
|
10556
10565
|
}
|
|
10557
10566
|
if (!colorLine) {
|
|
@@ -10989,7 +10998,7 @@
|
|
|
10989
10998
|
}
|
|
10990
10999
|
const tiltAnimation = particle.options.tilt.animation;
|
|
10991
11000
|
if (tiltAnimation.enable) {
|
|
10992
|
-
particle.tilt.velocity = tiltAnimation.speed / 360 * this.container.retina.reduceFactor;
|
|
11001
|
+
particle.tilt.velocity = getRangeValue(tiltAnimation.speed) / 360 * this.container.retina.reduceFactor;
|
|
10993
11002
|
if (!tiltAnimation.sync) {
|
|
10994
11003
|
particle.tilt.velocity *= Math.random();
|
|
10995
11004
|
}
|