Infection

key option type example notes
cure boolean true / false if the infection can be cured, bringing back the particle to its normal state
delay number 1 the "symptoms" delay, after how many seconds the infected particle change its state
enable boolean true / false
infections number 1 how many particles are infected at startup
stages array

Infection Stage

key option type example notes
color color object This color object is the same described here {@link IColor}
radius number 1 an outer radius for spreading the infection without touch
rate number 1 chances of infecting other particles
duration number 1 how many seconds does the stage should last
infectedStage number 0 which stage should be set when a particle will be infected by another at this stage

Implements

Constructors

Properties

Methods

Constructors

Properties

cure: boolean

This property specifies if particles can turn back to the original state after being infected

delay: number

The infection delay of the new infected particles, initial infected particles won't be affected.

enable: boolean

Enables the infection animations

infections: number

The initial number of infected particles

stages: InfectionStage[]

This property contains all the infection stages configurations, array of IInfectionStage

Methods