C H A P T E R 2
■ ■ ■
Effect: Particle Systems
Particle systems are used in many video games and other animations. A particle system is a general term
for any visual effect that uses a large number of small, simple, animated nodes to create a larger,
complex effect. This technique produces animations that are hard to reproduce using a single vector,
raster image, or other method. Examples of particle systems include fire, magic spells, sparks, and
moving water. This chapter covers the basic principles of particle systems in 2D space, and how they are
implemented in JavaFX. There are a number of examples, each building on the previous one. You'll find
it very helpful to have the example code on hand when reading this chapter.
A particle system is composed of a single emitter node and many short-lived nodes called particles. In
general, an emitter defines where and at what rate particles are created. The particles themselves
determine how they will move and when they should be removed from the scene. The visual impact is
determined by how they are emitted, as well as the appearance of a given particle.