Hi,
first of all -- great work. Love your script! I wondered if there is a method to stop the animation. The reason I am looking for a stopping mechanism is that I would like to stop the particlesJS animation while an instance of fancybox 2 is open to conserve cpu power for slower computers and tablets.
That pJSDom[0].pJS.particles.move.enable = false; function does nothing for me. Not even an errormessage on the console. But I know, that afterLoad fires properly.
Can you tell me, at which point I am too stupid?
$(document).ready(function() {
$(".fancybox").fancybox({
afterLoad: function(){
pJSDom[0].pJS.particles.move.enable = false;
},
afterClose: function(){
},
});
I'm not the author of this script. You can find instructions how to use it on: https://github.com/VincentGarreau/particles.js
@tverezo that was pretty much the most useless comment I have ever seen.
@villanus did you ever figure out how to stop the animation? Am using ParticlesJS in a SinglePageApplication and somehow it just doesn't want to stop running in the background!
@villanus , see https://github.com/VincentGarreau/particles.js/issues/63#issuecomment-242977446
My SuperParticles, which essentially is a performance-focused alternative to particles.js, has a stopAnimation() method... for those interested.
Most helpful comment
@tverezo that was pretty much the most useless comment I have ever seen.