Given a pixel in the img, calculates the color of the corresponding particle. Fewer colors will result in better performance (higher framerates). This function is only executed on pixels whose filters return true.
Given a pixel in the img, the filter determines whether or not a particle should be created for this pixel. This is run for all pixels in the image in random order until maxParticles limit is reached. If the filter returns true, a particle will be created for this pixel.
Given a pixel in the img, calculates the coefficient of kinetic friction of the corresponding particle. This should have a value between 0 and 1. This function is only executed on pixels whose filters return true.
Given a pixel in the img, calculates the initial position vector of the corresponding particle. This function is only executed on pixels whose filters return true.
Given a pixel in the img, calculates the initial velocity vector of the corresponding particle. This function is only executed on pixels whose filters return true.
Given a pixel in the img, calculates the mass of the corresponding particle. This function is only executed on pixels whose filters return true.
Given a pixel in the img, calculates the radius of the corresponding particle. This function is only executed on pixels whose filters return true.
Generated using TypeDoc
Options to be applied to particles during their creation.