Skip to content

Particle system documentation

Peter Crew edited this page Jan 4, 2019 · 2 revisions

This page covers the ParticleSystem class, along with all of the classes for particle spawn shapes.


ParticleSystem

This class represents a system of particles, and is responsible for detailing how the particles behave.

Constructor

The constructor takes a single JavaScript object with the following properties:

Name Type Required? Description
texture ParticleTexture Only if colour and additive are not provided. The texture for the particle texture atlas that should be used.
colour Vector3f Only if texture is not provided. The colour of the particle, with normalised values (RGB is from 0-1).
additive boolean Only if texture is not provided. True if additive blending should be used.
spawn ParticleSpawn Yes The spawn shape of the particles.
rate float Yes The number of particles spawned per second.
speed float Yes The average speed of each spawned particle.
gravity float Yes How much gravity affects each particle (1 is standard gravity).
life float Yes The average number of seconds that the particle is alive for.
scale float Yes The average scale of each particle.

TO BE CONTINUED

Clone this wiki locally