The library provides various utility methods to build it's features on.
Since there is a lot of calculation done under the hood, the library defines required mathematical operations that are commonly used.
Common "random" operations in the library as helper methods.
To allow variety in the way that particles disappear, the particle has the default despawning rules saved in a lookup under
party.despawningRules. These are functions that take a particle as a parameter, and check whether the particle is ready to be despawned. By default, these rules include:
lifetime: The particle is despawned once it's lifetime is over.
bounds: The particle is despawned once it's position goes below the lower edge of the document.