Posted January 08, 2021 by Akzidenz
#DragonRuby #Particles
I finally got around to improving this demo with performance improvements. The web version is capable of supporting hundreds of particles and maintaining 60fps. On the desktop, it can support several thousand.
I changed the construction of the effects to make it easier to build new ones and also added a 'move' method that allows you to define custom movement for particles each time their position is updated.
For fun, I added two new effects. A wafty "smoke" effect and a spherical "swirl" effect.
The source code is available here under an MIT license: https://github.com/oeloeloel/dragonruby-particle-explosions
Suggestions for code optimisations or improvements are welcome.