It's not responsive. What are the options to make it responsive?
Is it the topmost
It is the topmost.
Hi @akashnimare , @dabockster :)
To make it responsive, juste set the "density_auto" option to "true". And with the "density_area" option, you can set an area relative to the defined number of particles (particles.nb option).
particlesJS('particles-js', {
particles: {
nb: 80
},
interactivity: {
events: {
onresize: {
enable: true,
density_auto: true,
density_area: 400 // nb_particles = particles.nb * (canvas width * canvas height / 1000) / density_area
}
}
}
});
There is a demo juste here: http://vincentgarreau.com/particles.js/responsive
@VincentGarreau Thank you!
Hi Vincent, i love particles.
The code you provide about responsiveness, where i need to put it? I have the json file with all the configuration. Thanks!
I am having a similar issue with responsiveness of the particles as well as the mouse location on window size change. Here are examples of what is occuring.
Before screen size change:
https://media.giphy.com/media/xBpGtoZh7l6PAbmlpi/giphy.gif
After: (mouse location moves, and scale of lines/nodes are different)
https://media.giphy.com/media/khOqDEduaH6GsTFBYq/giphy.gif
I am having a similar issue with responsiveness of the particles as well as the mouse location on window size change. Here are examples of what is occuring.
Before screen size change:
https://media.giphy.com/media/xBpGtoZh7l6PAbmlpi/giphy.gifAfter: (mouse location moves, and scale of lines/nodes are different)
https://media.giphy.com/media/khOqDEduaH6GsTFBYq/giphy.gif
Can you post your json and your css.
Most helpful comment
Hi @akashnimare , @dabockster :)
To make it responsive, juste set the "density_auto" option to "true". And with the "density_area" option, you can set an area relative to the defined number of particles (particles.nb option).
There is a demo juste here: http://vincentgarreau.com/particles.js/responsive