Particles.js: Method to stop the animation?

Created on 8 Mar 2016  路  5Comments  路  Source: VincentGarreau/particles.js

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(){
},
});

Most helpful comment

@tverezo that was pretty much the most useless comment I have ever seen.

All 5 comments

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!

My SuperParticles, which essentially is a performance-focused alternative to particles.js, has a stopAnimation() method... for those interested.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

akashnimare picture akashnimare  路  7Comments

ghost picture ghost  路  7Comments

lightninglu10 picture lightninglu10  路  7Comments

khamarzama picture khamarzama  路  5Comments

cedriccharles4 picture cedriccharles4  路  3Comments