Creating particles
The process of creating and displaying particles looks as follows:
Create a particle material
Create a
Particlesinstance, which will be used to contain and render the particlesUse the
Particleclass to instantiate a particle (or more likely, a whole bunch), and pass material, size, and position as parameters to itUse the
addParticle()method to add the particle(s) to theParticlesobject
The order of the first two steps is interchangeable because the particle material and the Particles instance do not need each other.
Using a Particles class, as well as a Particle class may sound confusing. The Particles instance is solely used to hold and render the Particle instances and, in fact, is a do3D. But the Particle instances are the actual particles and the applied material defines the way they look.
To create particles in Papervision3D we need materials that define their appearance. You can apply three types of material to a particle:
ParticleMaterial: The most basic material...