r/javascript • u/CaelanIt tsParticles • Jul 25 '21
Is Particles.js still good in 2021?
https://dev.to/matteobruni/is-particles-js-still-good-in-2021-3oag15
u/AsyncBanana Jul 25 '21
While this is a lot of self-advertising, there is a good point in that you generally should not use unmaintained projects, especially if those projects do not work well on touch devices, which are increasingly important to support. Using TypeScript is also a nice addition because of the built-in typings.
However, one worrying thing about tsParticles is that the bundle size according to Bundlephobia is almost 10 times that of Particles.js
Is this a problem with Bundlephobia? Or is there a feature added that ended up heavily increasing the bundle size?
-6
u/CaelanIt tsParticles Jul 25 '21
Each feature has a cost, but I’m working on release 2.0 that will be more plug-in oriented so everyone can choose what features are being used. Some plug-ins are already available, but it’s not enough. But my concern at the moment is particles reusability because the array splice is heavy compared to reuse
10
u/KamiShikkaku Jul 25 '21
This library started having issues with Firefox in 2014, but who uses Firefox in 2021? Chrome is the best! Browsers and the web is going fast, and browsers don't care if a library will broke with the new update. Who wants a broken website when there's a valid alternative.
Quality writing
2
u/infl888 Jul 25 '21
Also want to know, does it slow down your site alot?
2
u/CaelanIt tsParticles Jul 25 '21
It depends on the configuration, lot of particles with lot of enabled features have a different cost than few particles doing less things
3
3
u/imasarrok Jul 25 '21
I used to use it in a small JS game a few years ago. Apart from the fact that it isn’t maintained anymore, there were a few major issues with performance if you swapped out config (to get different type of particles), and/or re-mounted the instance a lot.
There is an array for all the particles somewhere in the instance, which tracks particle data. We managed to improve performance a little by clearing the array every remount/confit change.
4
u/renome Jul 26 '21
Writing is a skill like any other, you need to keep honing yours, this article went nowhere.
2
31
u/terenc3 Jul 25 '21
So this is just a rant about an abandoned project to promote a self developed alternative? Are there other alternatives? What does tsParticles do to prevent the same state in which particle.js currently is (e.g. when the pandemic is less serve and the author has less time to focus on this sideproject?)?