Finally! We have reached the fun part of the book where the magic happens. It's all fine and dandy using rectangles, text, and buttons, but particles addsplash and zing, together with adding wisps of light to games. They can also be used to highlight and emphasize items of interest.
Particles are a type of animation that consist of numerous graphical elements, all moving in a fuzzy manner. There are four main QML components to use:
ParticleSystem
: Maintains the particle animation timelineEmitters
: Radiates the particles in to the system
Painters
: These components paint the particles. Here are the various components:ImageParticle
: A particle using an imageItemParticle
: A particle using a QML item as delegateCustomParticle
: A particle using a shader
Affectors
: Alters the properties of a particle
To see how we manage all these items, let's take a look at the main particle manager, the ParticleSystem
.