particles.js
particles.js copied to clipboard
Canvas size issue after resizing window
I'm initializing it this way
particlesJS.load('particles-js', '/assets/js/particles.json', function() { let el = document.querySelector(".particles-js-canvas-el"); el.setAttribute("height", "500px"); });
If I un-maximize the window and then maximize it back I get this weird behavior, the canvas gets almost 3 times bigger
Why settings those attributes programmatically? Use CSS, particles.js adjust itself automatically.
Anyway this project is abandoned, I recommend you the litghter alternative tsParticles
Oh, I think this project has not been abandoned, on the contrary it is very powerful and convenient. Please respect the author's work.