Translation of http://www.playfuljs.com/particle-effects-are-easy/ into Swift